Documentation ¶
Index ¶
- type ActionType
- type ClientFactory
- func (c *ClientFactory) NewGalleryImagesClient() *GalleryImagesClient
- func (c *ClientFactory) NewGuestAgentClient() *GuestAgentClient
- func (c *ClientFactory) NewGuestAgentsClient() *GuestAgentsClient
- func (c *ClientFactory) NewHybridIdentityMetadataClient() *HybridIdentityMetadataClient
- func (c *ClientFactory) NewLogicalNetworksClient() *LogicalNetworksClient
- func (c *ClientFactory) NewMarketplaceGalleryImagesClient() *MarketplaceGalleryImagesClient
- func (c *ClientFactory) NewNetworkInterfacesClient() *NetworkInterfacesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewStorageContainersClient() *StorageContainersClient
- func (c *ClientFactory) NewVirtualHardDisksClient() *VirtualHardDisksClient
- func (c *ClientFactory) NewVirtualMachineInstancesClient() *VirtualMachineInstancesClient
- type CloudInitDataSource
- type CreatedByType
- type DiskFileFormat
- type ErrorAdditionalInfo
- type ErrorDetail
- type ExtendedLocation
- type ExtendedLocationTypes
- type GalleryImageIdentifier
- type GalleryImageProperties
- type GalleryImageStatus
- type GalleryImageStatusDownloadStatus
- type GalleryImageStatusProvisioningStatus
- type GalleryImageVersion
- type GalleryImageVersionProperties
- type GalleryImageVersionStorageProfile
- type GalleryImages
- type GalleryImagesClient
- func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryImageName string, ...) (*runtime.Poller[GalleryImagesClientCreateOrUpdateResponse], error)
- func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryImageName string, ...) (*runtime.Poller[GalleryImagesClientDeleteResponse], error)
- func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryImageName string, ...) (*runtime.Poller[GalleryImagesClientUpdateResponse], error)
- func (client *GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryImageName string, ...) (GalleryImagesClientGetResponse, error)
- func (client *GalleryImagesClient) NewListAllPager(options *GalleryImagesClientListAllOptions) *runtime.Pager[GalleryImagesClientListAllResponse]
- func (client *GalleryImagesClient) NewListPager(resourceGroupName string, options *GalleryImagesClientListOptions) *runtime.Pager[GalleryImagesClientListResponse]
- type GalleryImagesClientBeginCreateOrUpdateOptions
- type GalleryImagesClientBeginDeleteOptions
- type GalleryImagesClientBeginUpdateOptions
- type GalleryImagesClientCreateOrUpdateResponse
- type GalleryImagesClientDeleteResponse
- type GalleryImagesClientGetOptions
- type GalleryImagesClientGetResponse
- type GalleryImagesClientListAllOptions
- type GalleryImagesClientListAllResponse
- type GalleryImagesClientListOptions
- type GalleryImagesClientListResponse
- type GalleryImagesClientUpdateResponse
- type GalleryImagesListResult
- type GalleryImagesUpdateRequest
- type GalleryOSDiskImage
- type GuestAgent
- type GuestAgentClient
- func (client *GuestAgentClient) BeginCreate(ctx context.Context, resourceURI string, ...) (*runtime.Poller[GuestAgentClientCreateResponse], error)
- func (client *GuestAgentClient) BeginDelete(ctx context.Context, resourceURI string, ...) (*runtime.Poller[GuestAgentClientDeleteResponse], error)
- func (client *GuestAgentClient) Get(ctx context.Context, resourceURI string, options *GuestAgentClientGetOptions) (GuestAgentClientGetResponse, error)
- type GuestAgentClientBeginCreateOptions
- type GuestAgentClientBeginDeleteOptions
- type GuestAgentClientCreateResponse
- type GuestAgentClientDeleteResponse
- type GuestAgentClientGetOptions
- type GuestAgentClientGetResponse
- type GuestAgentInstallStatus
- type GuestAgentList
- type GuestAgentProperties
- type GuestAgentsClient
- type GuestAgentsClientListOptions
- type GuestAgentsClientListResponse
- type GuestCredential
- type HTTPProxyConfiguration
- type HardwareProfileUpdate
- type HybridIdentityMetadata
- type HybridIdentityMetadataClient
- func (client *HybridIdentityMetadataClient) Get(ctx context.Context, resourceURI string, ...) (HybridIdentityMetadataClientGetResponse, error)
- func (client *HybridIdentityMetadataClient) NewListPager(resourceURI string, options *HybridIdentityMetadataClientListOptions) *runtime.Pager[HybridIdentityMetadataClientListResponse]
- type HybridIdentityMetadataClientGetOptions
- type HybridIdentityMetadataClientGetResponse
- type HybridIdentityMetadataClientListOptions
- type HybridIdentityMetadataClientListResponse
- type HybridIdentityMetadataList
- type HybridIdentityMetadataProperties
- type HyperVGeneration
- type IPAllocationMethodEnum
- type IPConfiguration
- type IPConfigurationProperties
- type IPConfigurationPropertiesSubnet
- type IPPool
- type IPPoolInfo
- type IPPoolTypeEnum
- type Identity
- type InstanceViewStatus
- type InterfaceDNSSettings
- type LogicalNetworkProperties
- type LogicalNetworkPropertiesDhcpOptions
- type LogicalNetworkStatus
- type LogicalNetworkStatusProvisioningStatus
- type LogicalNetworks
- type LogicalNetworksClient
- func (client *LogicalNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, logicalNetworkName string, ...) (*runtime.Poller[LogicalNetworksClientCreateOrUpdateResponse], error)
- func (client *LogicalNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, logicalNetworkName string, ...) (*runtime.Poller[LogicalNetworksClientDeleteResponse], error)
- func (client *LogicalNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, logicalNetworkName string, ...) (*runtime.Poller[LogicalNetworksClientUpdateResponse], error)
- func (client *LogicalNetworksClient) Get(ctx context.Context, resourceGroupName string, logicalNetworkName string, ...) (LogicalNetworksClientGetResponse, error)
- func (client *LogicalNetworksClient) NewListAllPager(options *LogicalNetworksClientListAllOptions) *runtime.Pager[LogicalNetworksClientListAllResponse]
- func (client *LogicalNetworksClient) NewListPager(resourceGroupName string, options *LogicalNetworksClientListOptions) *runtime.Pager[LogicalNetworksClientListResponse]
- type LogicalNetworksClientBeginCreateOrUpdateOptions
- type LogicalNetworksClientBeginDeleteOptions
- type LogicalNetworksClientBeginUpdateOptions
- type LogicalNetworksClientCreateOrUpdateResponse
- type LogicalNetworksClientDeleteResponse
- type LogicalNetworksClientGetOptions
- type LogicalNetworksClientGetResponse
- type LogicalNetworksClientListAllOptions
- type LogicalNetworksClientListAllResponse
- type LogicalNetworksClientListOptions
- type LogicalNetworksClientListResponse
- type LogicalNetworksClientUpdateResponse
- type LogicalNetworksListResult
- type LogicalNetworksUpdateRequest
- type MarketplaceGalleryImageProperties
- type MarketplaceGalleryImageStatus
- type MarketplaceGalleryImageStatusDownloadStatus
- type MarketplaceGalleryImageStatusProvisioningStatus
- type MarketplaceGalleryImages
- type MarketplaceGalleryImagesClient
- func (client *MarketplaceGalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[MarketplaceGalleryImagesClientCreateOrUpdateResponse], error)
- func (client *MarketplaceGalleryImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[MarketplaceGalleryImagesClientDeleteResponse], error)
- func (client *MarketplaceGalleryImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[MarketplaceGalleryImagesClientUpdateResponse], error)
- func (client *MarketplaceGalleryImagesClient) Get(ctx context.Context, resourceGroupName string, ...) (MarketplaceGalleryImagesClientGetResponse, error)
- func (client *MarketplaceGalleryImagesClient) NewListAllPager(options *MarketplaceGalleryImagesClientListAllOptions) *runtime.Pager[MarketplaceGalleryImagesClientListAllResponse]
- func (client *MarketplaceGalleryImagesClient) NewListPager(resourceGroupName string, options *MarketplaceGalleryImagesClientListOptions) *runtime.Pager[MarketplaceGalleryImagesClientListResponse]
- type MarketplaceGalleryImagesClientBeginCreateOrUpdateOptions
- type MarketplaceGalleryImagesClientBeginDeleteOptions
- type MarketplaceGalleryImagesClientBeginUpdateOptions
- type MarketplaceGalleryImagesClientCreateOrUpdateResponse
- type MarketplaceGalleryImagesClientDeleteResponse
- type MarketplaceGalleryImagesClientGetOptions
- type MarketplaceGalleryImagesClientGetResponse
- type MarketplaceGalleryImagesClientListAllOptions
- type MarketplaceGalleryImagesClientListAllResponse
- type MarketplaceGalleryImagesClientListOptions
- type MarketplaceGalleryImagesClientListResponse
- type MarketplaceGalleryImagesClientUpdateResponse
- type MarketplaceGalleryImagesListResult
- type MarketplaceGalleryImagesUpdateRequest
- type NetworkInterfaceProperties
- type NetworkInterfaceStatus
- type NetworkInterfaceStatusProvisioningStatus
- type NetworkInterfaces
- type NetworkInterfacesClient
- func (client *NetworkInterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, ...) (*runtime.Poller[NetworkInterfacesClientCreateOrUpdateResponse], error)
- func (client *NetworkInterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, ...) (*runtime.Poller[NetworkInterfacesClientDeleteResponse], error)
- func (client *NetworkInterfacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, ...) (*runtime.Poller[NetworkInterfacesClientUpdateResponse], error)
- func (client *NetworkInterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, ...) (NetworkInterfacesClientGetResponse, error)
- func (client *NetworkInterfacesClient) NewListAllPager(options *NetworkInterfacesClientListAllOptions) *runtime.Pager[NetworkInterfacesClientListAllResponse]
- func (client *NetworkInterfacesClient) NewListPager(resourceGroupName string, options *NetworkInterfacesClientListOptions) *runtime.Pager[NetworkInterfacesClientListResponse]
- type NetworkInterfacesClientBeginCreateOrUpdateOptions
- type NetworkInterfacesClientBeginDeleteOptions
- type NetworkInterfacesClientBeginUpdateOptions
- type NetworkInterfacesClientCreateOrUpdateResponse
- type NetworkInterfacesClientDeleteResponse
- type NetworkInterfacesClientGetOptions
- type NetworkInterfacesClientGetResponse
- type NetworkInterfacesClientListAllOptions
- type NetworkInterfacesClientListAllResponse
- type NetworkInterfacesClientListOptions
- type NetworkInterfacesClientListResponse
- type NetworkInterfacesClientUpdateResponse
- type NetworkInterfacesListResult
- type NetworkInterfacesUpdateRequest
- type NetworkProfileUpdate
- type NetworkProfileUpdateNetworkInterfacesItem
- type OperatingSystemTypes
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type OsProfileUpdate
- type OsProfileUpdateLinuxConfiguration
- type OsProfileUpdateWindowsConfiguration
- type PowerStateEnum
- type ProvisioningAction
- type ProvisioningStateEnum
- type Route
- type RoutePropertiesFormat
- type RouteTable
- type RouteTablePropertiesFormat
- type SSHConfiguration
- type SSHPublicKey
- type SecurityTypes
- type Status
- type StatusLevelTypes
- type StatusTypes
- type StorageContainerProperties
- type StorageContainerStatus
- type StorageContainerStatusProvisioningStatus
- type StorageContainers
- type StorageContainersClient
- func (client *StorageContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, storageContainerName string, ...) (*runtime.Poller[StorageContainersClientCreateOrUpdateResponse], error)
- func (client *StorageContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, storageContainerName string, ...) (*runtime.Poller[StorageContainersClientDeleteResponse], error)
- func (client *StorageContainersClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageContainerName string, ...) (*runtime.Poller[StorageContainersClientUpdateResponse], error)
- func (client *StorageContainersClient) Get(ctx context.Context, resourceGroupName string, storageContainerName string, ...) (StorageContainersClientGetResponse, error)
- func (client *StorageContainersClient) NewListAllPager(options *StorageContainersClientListAllOptions) *runtime.Pager[StorageContainersClientListAllResponse]
- func (client *StorageContainersClient) NewListPager(resourceGroupName string, options *StorageContainersClientListOptions) *runtime.Pager[StorageContainersClientListResponse]
- type StorageContainersClientBeginCreateOrUpdateOptions
- type StorageContainersClientBeginDeleteOptions
- type StorageContainersClientBeginUpdateOptions
- type StorageContainersClientCreateOrUpdateResponse
- type StorageContainersClientDeleteResponse
- type StorageContainersClientGetOptions
- type StorageContainersClientGetResponse
- type StorageContainersClientListAllOptions
- type StorageContainersClientListAllResponse
- type StorageContainersClientListOptions
- type StorageContainersClientListResponse
- type StorageContainersClientUpdateResponse
- type StorageContainersListResult
- type StorageContainersUpdateRequest
- type StorageProfileUpdate
- type StorageProfileUpdateDataDisksItem
- type Subnet
- type SubnetPropertiesFormat
- type SubnetPropertiesFormatIPConfigurationReferencesItem
- type SystemData
- type VMSizeEnum
- type VirtualHardDiskProperties
- type VirtualHardDiskStatus
- type VirtualHardDiskStatusProvisioningStatus
- type VirtualHardDisks
- type VirtualHardDisksClient
- func (client *VirtualHardDisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHardDiskName string, ...) (*runtime.Poller[VirtualHardDisksClientCreateOrUpdateResponse], error)
- func (client *VirtualHardDisksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHardDiskName string, ...) (*runtime.Poller[VirtualHardDisksClientDeleteResponse], error)
- func (client *VirtualHardDisksClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualHardDiskName string, ...) (*runtime.Poller[VirtualHardDisksClientUpdateResponse], error)
- func (client *VirtualHardDisksClient) Get(ctx context.Context, resourceGroupName string, virtualHardDiskName string, ...) (VirtualHardDisksClientGetResponse, error)
- func (client *VirtualHardDisksClient) NewListAllPager(options *VirtualHardDisksClientListAllOptions) *runtime.Pager[VirtualHardDisksClientListAllResponse]
- func (client *VirtualHardDisksClient) NewListPager(resourceGroupName string, options *VirtualHardDisksClientListOptions) *runtime.Pager[VirtualHardDisksClientListResponse]
- type VirtualHardDisksClientBeginCreateOrUpdateOptions
- type VirtualHardDisksClientBeginDeleteOptions
- type VirtualHardDisksClientBeginUpdateOptions
- type VirtualHardDisksClientCreateOrUpdateResponse
- type VirtualHardDisksClientDeleteResponse
- type VirtualHardDisksClientGetOptions
- type VirtualHardDisksClientGetResponse
- type VirtualHardDisksClientListAllOptions
- type VirtualHardDisksClientListAllResponse
- type VirtualHardDisksClientListOptions
- type VirtualHardDisksClientListResponse
- type VirtualHardDisksClientUpdateResponse
- type VirtualHardDisksListResult
- type VirtualHardDisksUpdateRequest
- type VirtualMachineConfigAgentInstanceView
- type VirtualMachineInstance
- type VirtualMachineInstanceListResult
- type VirtualMachineInstanceProperties
- type VirtualMachineInstancePropertiesHardwareProfile
- type VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig
- type VirtualMachineInstancePropertiesNetworkProfile
- type VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem
- type VirtualMachineInstancePropertiesOsProfile
- type VirtualMachineInstancePropertiesOsProfileLinuxConfiguration
- type VirtualMachineInstancePropertiesOsProfileWindowsConfiguration
- type VirtualMachineInstancePropertiesSecurityProfile
- type VirtualMachineInstancePropertiesSecurityProfileUefiSettings
- type VirtualMachineInstancePropertiesStorageProfile
- type VirtualMachineInstancePropertiesStorageProfileDataDisksItem
- type VirtualMachineInstancePropertiesStorageProfileImageReference
- type VirtualMachineInstancePropertiesStorageProfileOsDisk
- type VirtualMachineInstanceStatus
- type VirtualMachineInstanceStatusProvisioningStatus
- type VirtualMachineInstanceUpdateProperties
- type VirtualMachineInstanceUpdateRequest
- type VirtualMachineInstanceView
- type VirtualMachineInstancesClient
- func (client *VirtualMachineInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceURI string, ...) (*runtime.Poller[VirtualMachineInstancesClientCreateOrUpdateResponse], error)
- func (client *VirtualMachineInstancesClient) BeginDelete(ctx context.Context, resourceURI string, ...) (*runtime.Poller[VirtualMachineInstancesClientDeleteResponse], error)
- func (client *VirtualMachineInstancesClient) BeginRestart(ctx context.Context, resourceURI string, ...) (*runtime.Poller[VirtualMachineInstancesClientRestartResponse], error)
- func (client *VirtualMachineInstancesClient) BeginStart(ctx context.Context, resourceURI string, ...) (*runtime.Poller[VirtualMachineInstancesClientStartResponse], error)
- func (client *VirtualMachineInstancesClient) BeginStop(ctx context.Context, resourceURI string, ...) (*runtime.Poller[VirtualMachineInstancesClientStopResponse], error)
- func (client *VirtualMachineInstancesClient) BeginUpdate(ctx context.Context, resourceURI string, ...) (*runtime.Poller[VirtualMachineInstancesClientUpdateResponse], error)
- func (client *VirtualMachineInstancesClient) Get(ctx context.Context, resourceURI string, ...) (VirtualMachineInstancesClientGetResponse, error)
- func (client *VirtualMachineInstancesClient) NewListPager(resourceURI string, options *VirtualMachineInstancesClientListOptions) *runtime.Pager[VirtualMachineInstancesClientListResponse]
- type VirtualMachineInstancesClientBeginCreateOrUpdateOptions
- type VirtualMachineInstancesClientBeginDeleteOptions
- type VirtualMachineInstancesClientBeginRestartOptions
- type VirtualMachineInstancesClientBeginStartOptions
- type VirtualMachineInstancesClientBeginStopOptions
- type VirtualMachineInstancesClientBeginUpdateOptions
- type VirtualMachineInstancesClientCreateOrUpdateResponse
- type VirtualMachineInstancesClientDeleteResponse
- type VirtualMachineInstancesClientGetOptions
- type VirtualMachineInstancesClientGetResponse
- type VirtualMachineInstancesClientListOptions
- type VirtualMachineInstancesClientListResponse
- type VirtualMachineInstancesClientRestartResponse
- type VirtualMachineInstancesClientStartResponse
- type VirtualMachineInstancesClientStopResponse
- type VirtualMachineInstancesClientUpdateResponse
Examples ¶
- GalleryImagesClient.BeginCreateOrUpdate
- GalleryImagesClient.BeginDelete
- GalleryImagesClient.BeginUpdate
- GalleryImagesClient.Get
- GalleryImagesClient.NewListAllPager
- GalleryImagesClient.NewListPager
- GuestAgentClient.BeginCreate
- GuestAgentClient.BeginDelete
- GuestAgentClient.Get
- GuestAgentsClient.NewListPager
- HybridIdentityMetadataClient.Get
- HybridIdentityMetadataClient.NewListPager
- LogicalNetworksClient.BeginCreateOrUpdate
- LogicalNetworksClient.BeginDelete
- LogicalNetworksClient.BeginUpdate
- LogicalNetworksClient.Get
- LogicalNetworksClient.NewListAllPager
- LogicalNetworksClient.NewListPager
- MarketplaceGalleryImagesClient.BeginCreateOrUpdate
- MarketplaceGalleryImagesClient.BeginDelete
- MarketplaceGalleryImagesClient.BeginUpdate
- MarketplaceGalleryImagesClient.Get
- MarketplaceGalleryImagesClient.NewListAllPager
- MarketplaceGalleryImagesClient.NewListPager
- NetworkInterfacesClient.BeginCreateOrUpdate
- NetworkInterfacesClient.BeginDelete
- NetworkInterfacesClient.BeginUpdate
- NetworkInterfacesClient.Get
- NetworkInterfacesClient.NewListAllPager
- NetworkInterfacesClient.NewListPager
- OperationsClient.NewListPager
- StorageContainersClient.BeginCreateOrUpdate
- StorageContainersClient.BeginDelete
- StorageContainersClient.BeginUpdate
- StorageContainersClient.Get
- StorageContainersClient.NewListAllPager
- StorageContainersClient.NewListPager
- VirtualHardDisksClient.BeginCreateOrUpdate
- VirtualHardDisksClient.BeginDelete
- VirtualHardDisksClient.BeginUpdate
- VirtualHardDisksClient.Get
- VirtualHardDisksClient.NewListAllPager
- VirtualHardDisksClient.NewListPager
- VirtualMachineInstancesClient.BeginCreateOrUpdate (PutVirtualMachineInstanceWithGalleryImage)
- VirtualMachineInstancesClient.BeginCreateOrUpdate (PutVirtualMachineInstanceWithMarketplaceGalleryImage)
- VirtualMachineInstancesClient.BeginCreateOrUpdate (PutVirtualMachineInstanceWithOsDisk)
- VirtualMachineInstancesClient.BeginCreateOrUpdate (PutVirtualMachineInstanceWithVmConfigAgent)
- VirtualMachineInstancesClient.BeginDelete
- VirtualMachineInstancesClient.BeginRestart
- VirtualMachineInstancesClient.BeginStart
- VirtualMachineInstancesClient.BeginStop
- VirtualMachineInstancesClient.BeginUpdate
- VirtualMachineInstancesClient.Get
- VirtualMachineInstancesClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType 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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewGalleryImagesClient ¶
func (c *ClientFactory) NewGalleryImagesClient() *GalleryImagesClient
NewGalleryImagesClient creates a new instance of GalleryImagesClient.
func (*ClientFactory) NewGuestAgentClient ¶
func (c *ClientFactory) NewGuestAgentClient() *GuestAgentClient
NewGuestAgentClient creates a new instance of GuestAgentClient.
func (*ClientFactory) NewGuestAgentsClient ¶
func (c *ClientFactory) NewGuestAgentsClient() *GuestAgentsClient
NewGuestAgentsClient creates a new instance of GuestAgentsClient.
func (*ClientFactory) NewHybridIdentityMetadataClient ¶
func (c *ClientFactory) NewHybridIdentityMetadataClient() *HybridIdentityMetadataClient
NewHybridIdentityMetadataClient creates a new instance of HybridIdentityMetadataClient.
func (*ClientFactory) NewLogicalNetworksClient ¶
func (c *ClientFactory) NewLogicalNetworksClient() *LogicalNetworksClient
NewLogicalNetworksClient creates a new instance of LogicalNetworksClient.
func (*ClientFactory) NewMarketplaceGalleryImagesClient ¶
func (c *ClientFactory) NewMarketplaceGalleryImagesClient() *MarketplaceGalleryImagesClient
NewMarketplaceGalleryImagesClient creates a new instance of MarketplaceGalleryImagesClient.
func (*ClientFactory) NewNetworkInterfacesClient ¶
func (c *ClientFactory) NewNetworkInterfacesClient() *NetworkInterfacesClient
NewNetworkInterfacesClient creates a new instance of NetworkInterfacesClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewStorageContainersClient ¶
func (c *ClientFactory) NewStorageContainersClient() *StorageContainersClient
NewStorageContainersClient creates a new instance of StorageContainersClient.
func (*ClientFactory) NewVirtualHardDisksClient ¶
func (c *ClientFactory) NewVirtualHardDisksClient() *VirtualHardDisksClient
NewVirtualHardDisksClient creates a new instance of VirtualHardDisksClient.
func (*ClientFactory) NewVirtualMachineInstancesClient ¶
func (c *ClientFactory) NewVirtualMachineInstancesClient() *VirtualMachineInstancesClient
NewVirtualMachineInstancesClient creates a new instance of VirtualMachineInstancesClient.
type CloudInitDataSource ¶
type CloudInitDataSource string
CloudInitDataSource - Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure]
const ( CloudInitDataSourceAzure CloudInitDataSource = "Azure" CloudInitDataSourceNoCloud CloudInitDataSource = "NoCloud" )
func PossibleCloudInitDataSourceValues ¶
func PossibleCloudInitDataSourceValues() []CloudInitDataSource
PossibleCloudInitDataSourceValues returns the possible values for the CloudInitDataSource const type.
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 DiskFileFormat ¶
type DiskFileFormat string
DiskFileFormat - The format of the actual VHD file [vhd, vhdx]
const ( DiskFileFormatVhd DiskFileFormat = "vhd" DiskFileFormatVhdx DiskFileFormat = "vhdx" )
func PossibleDiskFileFormatValues ¶
func PossibleDiskFileFormatValues() []DiskFileFormat
PossibleDiskFileFormatValues returns the possible values for the DiskFileFormat const type.
type ErrorAdditionalInfo ¶
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 ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶
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 ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ExtendedLocation ¶
type ExtendedLocation struct { // The name of the extended location. Name *string // The type of the extended location. Type *ExtendedLocationTypes }
ExtendedLocation - The complex type of the extended location.
func (ExtendedLocation) MarshalJSON ¶
func (e ExtendedLocation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.
func (*ExtendedLocation) UnmarshalJSON ¶
func (e *ExtendedLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation.
type ExtendedLocationTypes ¶
type ExtendedLocationTypes string
ExtendedLocationTypes - The type of extendedLocation.
const (
ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)
func PossibleExtendedLocationTypesValues ¶
func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes
PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type.
type GalleryImageIdentifier ¶
type GalleryImageIdentifier struct { // REQUIRED; The name of the gallery image definition offer. Offer *string // REQUIRED; The name of the gallery image definition publisher. Publisher *string // REQUIRED; The name of the gallery image definition SKU. SKU *string }
GalleryImageIdentifier - This is the gallery image definition identifier.
func (GalleryImageIdentifier) MarshalJSON ¶
func (g GalleryImageIdentifier) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageIdentifier.
func (*GalleryImageIdentifier) UnmarshalJSON ¶
func (g *GalleryImageIdentifier) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageIdentifier.
type GalleryImageProperties ¶
type GalleryImageProperties struct { // REQUIRED; Operating system type that the gallery image uses [Windows, Linux] OSType *OperatingSystemTypes // Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] CloudInitDataSource *CloudInitDataSource // Storage ContainerID of the storage container to be used for gallery image ContainerID *string // The hypervisor generation of the Virtual Machine [V1, V2] HyperVGeneration *HyperVGeneration // This is the gallery image definition identifier. Identifier *GalleryImageIdentifier // location of the image the gallery image should be created from ImagePath *string // Specifies information about the gallery image version that you want to create or update. Version *GalleryImageVersion // READ-ONLY; Provisioning state of the gallery image. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of gallery images Status *GalleryImageStatus }
GalleryImageProperties - Properties under the gallery image resource
func (GalleryImageProperties) MarshalJSON ¶
func (g GalleryImageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageProperties.
func (*GalleryImageProperties) UnmarshalJSON ¶
func (g *GalleryImageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageProperties.
type GalleryImageStatus ¶
type GalleryImageStatus struct { // The download status of the gallery image DownloadStatus *GalleryImageStatusDownloadStatus // GalleryImage provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string // The progress of the operation in percentage ProgressPercentage *int64 ProvisioningStatus *GalleryImageStatusProvisioningStatus }
GalleryImageStatus - The observed state of gallery images
func (GalleryImageStatus) MarshalJSON ¶
func (g GalleryImageStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageStatus.
func (*GalleryImageStatus) UnmarshalJSON ¶
func (g *GalleryImageStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageStatus.
type GalleryImageStatusDownloadStatus ¶
type GalleryImageStatusDownloadStatus struct { // The downloaded sized of the image in MB DownloadSizeInMB *int64 }
GalleryImageStatusDownloadStatus - The download status of the gallery image
func (GalleryImageStatusDownloadStatus) MarshalJSON ¶
func (g GalleryImageStatusDownloadStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageStatusDownloadStatus.
func (*GalleryImageStatusDownloadStatus) UnmarshalJSON ¶
func (g *GalleryImageStatusDownloadStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageStatusDownloadStatus.
type GalleryImageStatusProvisioningStatus ¶
type GalleryImageStatusProvisioningStatus struct { // The ID of the operation performed on the gallery image OperationID *string // The status of the operation performed on the gallery image [Succeeded, Failed, InProgress] Status *Status }
func (GalleryImageStatusProvisioningStatus) MarshalJSON ¶
func (g GalleryImageStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageStatusProvisioningStatus.
func (*GalleryImageStatusProvisioningStatus) UnmarshalJSON ¶
func (g *GalleryImageStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageStatusProvisioningStatus.
type GalleryImageVersion ¶
type GalleryImageVersion struct { // This is the version of the gallery image. Name *string // Describes the properties of a gallery image version. Properties *GalleryImageVersionProperties }
GalleryImageVersion - Specifies information about the gallery image version that you want to create or update.
func (GalleryImageVersion) MarshalJSON ¶
func (g GalleryImageVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageVersion.
func (*GalleryImageVersion) UnmarshalJSON ¶
func (g *GalleryImageVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersion.
type GalleryImageVersionProperties ¶
type GalleryImageVersionProperties struct { // REQUIRED; This is the storage profile of a Gallery Image Version. StorageProfile *GalleryImageVersionStorageProfile }
GalleryImageVersionProperties - Describes the properties of a gallery image version.
func (GalleryImageVersionProperties) MarshalJSON ¶
func (g GalleryImageVersionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionProperties.
func (*GalleryImageVersionProperties) UnmarshalJSON ¶
func (g *GalleryImageVersionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionProperties.
type GalleryImageVersionStorageProfile ¶
type GalleryImageVersionStorageProfile struct { // This is the OS disk image. OSDiskImage *GalleryOSDiskImage }
GalleryImageVersionStorageProfile - This is the storage profile of a Gallery Image Version.
func (GalleryImageVersionStorageProfile) MarshalJSON ¶
func (g GalleryImageVersionStorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionStorageProfile.
func (*GalleryImageVersionStorageProfile) UnmarshalJSON ¶
func (g *GalleryImageVersionStorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionStorageProfile.
type GalleryImages ¶
type GalleryImages struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Properties under the gallery image resource Properties *GalleryImageProperties // 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 }
GalleryImages - The gallery images resource definition.
func (GalleryImages) MarshalJSON ¶
func (g GalleryImages) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImages.
func (*GalleryImages) UnmarshalJSON ¶
func (g *GalleryImages) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImages.
type GalleryImagesClient ¶
type GalleryImagesClient struct {
// contains filtered or unexported fields
}
GalleryImagesClient contains the methods for the GalleryImages group. Don't use this type directly, use NewGalleryImagesClient() instead.
func NewGalleryImagesClient ¶
func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImagesClient, error)
NewGalleryImagesClient creates a new instance of GalleryImagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*GalleryImagesClient) BeginCreateOrUpdate ¶
func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryImageName string, galleryImages GalleryImages, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryImagesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a gallery image. Please note some properties can be set only during gallery image creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- galleryImageName - Name of the gallery image
- options - GalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGalleryImagesClient().BeginCreateOrUpdate(ctx, "test-rg", "test-gallery-image", armazurestackhci.GalleryImages{ Location: to.Ptr("West US2"), ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.GalleryImageProperties{ ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), ImagePath: to.Ptr("C:\\test.vhdx"), OSType: to.Ptr(armazurestackhci.OperatingSystemTypesLinux), }, }, 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.GalleryImages = armazurestackhci.GalleryImages{ // Name: to.Ptr("test-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/galleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.GalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceNoCloud), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesLinux), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.GalleryImageStatus{ // DownloadStatus: &armazurestackhci.GalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.GalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }
Output:
func (*GalleryImagesClient) BeginDelete ¶
func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*runtime.Poller[GalleryImagesClientDeleteResponse], error)
BeginDelete - The operation to delete a gallery image. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- galleryImageName - Name of the gallery image
- options - GalleryImagesClientBeginDeleteOptions contains the optional parameters for the GalleryImagesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGalleryImagesClient().BeginDelete(ctx, "test-rg", "test-gallery-image", 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 (*GalleryImagesClient) BeginUpdate ¶
func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryImageName string, galleryImages GalleryImagesUpdateRequest, options *GalleryImagesClientBeginUpdateOptions) (*runtime.Poller[GalleryImagesClientUpdateResponse], error)
BeginUpdate - The operation to update a gallery image. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- galleryImageName - Name of the gallery image
- options - GalleryImagesClientBeginUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGalleryImagesClient().BeginUpdate(ctx, "test-rg", "test-gallery-image", armazurestackhci.GalleryImagesUpdateRequest{ Tags: map[string]*string{ "additionalProperties": to.Ptr("sample"), }, }, 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.GalleryImages = armazurestackhci.GalleryImages{ // Name: to.Ptr("test-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/galleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-galimg3325"), // Location: to.Ptr("West US2"), // Tags: map[string]*string{ // "additionalProperties": to.Ptr("sample"), // }, // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.GalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceNoCloud), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesLinux), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.GalleryImageStatus{ // DownloadStatus: &armazurestackhci.GalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.GalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }
Output:
func (*GalleryImagesClient) Get ¶
func (client *GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryImageName string, options *GalleryImagesClientGetOptions) (GalleryImagesClientGetResponse, error)
Get - Gets a gallery image If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- galleryImageName - Name of the gallery image
- options - GalleryImagesClientGetOptions contains the optional parameters for the GalleryImagesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGalleryImagesClient().Get(ctx, "test-rg", "test-gallery-image", 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.GalleryImages = armazurestackhci.GalleryImages{ // Name: to.Ptr("test-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/galleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.GalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceNoCloud), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), // Identifier: &armazurestackhci.GalleryImageIdentifier{ // Offer: to.Ptr("myOfferName"), // Publisher: to.Ptr("myPublisherName"), // SKU: to.Ptr("mySkuName"), // }, // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.GalleryImageStatus{ // DownloadStatus: &armazurestackhci.GalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.GalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Name: to.Ptr("1.0.0"), // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }
Output:
func (*GalleryImagesClient) NewListAllPager ¶
func (client *GalleryImagesClient) NewListAllPager(options *GalleryImagesClientListAllOptions) *runtime.Pager[GalleryImagesClientListAllResponse]
NewListAllPager - Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get the next page of gallery images.
Generated from API version 2023-09-01-preview
- options - GalleryImagesClientListAllOptions contains the optional parameters for the GalleryImagesClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListGalleryImageBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGalleryImagesClient().NewListAllPager(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.GalleryImagesListResult = armazurestackhci.GalleryImagesListResult{ // Value: []*armazurestackhci.GalleryImages{ // { // Name: to.Ptr("test-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/galleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.GalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceNoCloud), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesLinux), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.GalleryImageStatus{ // DownloadStatus: &armazurestackhci.GalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.GalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }}, // } }
Output:
func (*GalleryImagesClient) NewListPager ¶
func (client *GalleryImagesClient) NewListPager(resourceGroupName string, options *GalleryImagesClientListOptions) *runtime.Pager[GalleryImagesClientListResponse]
NewListPager - Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get the next page of gallery images.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - GalleryImagesClientListOptions contains the optional parameters for the GalleryImagesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListGalleryImageByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGalleryImagesClient().NewListPager("test-rg", 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.GalleryImagesListResult = armazurestackhci.GalleryImagesListResult{ // Value: []*armazurestackhci.GalleryImages{ // { // Name: to.Ptr("test-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/galleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.GalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceNoCloud), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesLinux), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.GalleryImageStatus{ // DownloadStatus: &armazurestackhci.GalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.GalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }}, // } }
Output:
type GalleryImagesClientBeginCreateOrUpdateOptions ¶
type GalleryImagesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginCreateOrUpdate method.
type GalleryImagesClientBeginDeleteOptions ¶
type GalleryImagesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GalleryImagesClientBeginDeleteOptions contains the optional parameters for the GalleryImagesClient.BeginDelete method.
type GalleryImagesClientBeginUpdateOptions ¶
type GalleryImagesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GalleryImagesClientBeginUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginUpdate method.
type GalleryImagesClientCreateOrUpdateResponse ¶
type GalleryImagesClientCreateOrUpdateResponse struct { // The gallery images resource definition. GalleryImages }
GalleryImagesClientCreateOrUpdateResponse contains the response from method GalleryImagesClient.BeginCreateOrUpdate.
type GalleryImagesClientDeleteResponse ¶
type GalleryImagesClientDeleteResponse struct { }
GalleryImagesClientDeleteResponse contains the response from method GalleryImagesClient.BeginDelete.
type GalleryImagesClientGetOptions ¶
type GalleryImagesClientGetOptions struct { }
GalleryImagesClientGetOptions contains the optional parameters for the GalleryImagesClient.Get method.
type GalleryImagesClientGetResponse ¶
type GalleryImagesClientGetResponse struct { // The gallery images resource definition. GalleryImages }
GalleryImagesClientGetResponse contains the response from method GalleryImagesClient.Get.
type GalleryImagesClientListAllOptions ¶
type GalleryImagesClientListAllOptions struct { }
GalleryImagesClientListAllOptions contains the optional parameters for the GalleryImagesClient.NewListAllPager method.
type GalleryImagesClientListAllResponse ¶
type GalleryImagesClientListAllResponse struct { // List of gallery images. GalleryImagesListResult }
GalleryImagesClientListAllResponse contains the response from method GalleryImagesClient.NewListAllPager.
type GalleryImagesClientListOptions ¶
type GalleryImagesClientListOptions struct { }
GalleryImagesClientListOptions contains the optional parameters for the GalleryImagesClient.NewListPager method.
type GalleryImagesClientListResponse ¶
type GalleryImagesClientListResponse struct { // List of gallery images. GalleryImagesListResult }
GalleryImagesClientListResponse contains the response from method GalleryImagesClient.NewListPager.
type GalleryImagesClientUpdateResponse ¶
type GalleryImagesClientUpdateResponse struct { // The gallery images resource definition. GalleryImages }
GalleryImagesClientUpdateResponse contains the response from method GalleryImagesClient.BeginUpdate.
type GalleryImagesListResult ¶
type GalleryImagesListResult struct { Value []*GalleryImages // READ-ONLY; Link to the next set of results. NextLink *string }
GalleryImagesListResult - List of gallery images.
func (GalleryImagesListResult) MarshalJSON ¶
func (g GalleryImagesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImagesListResult.
func (*GalleryImagesListResult) UnmarshalJSON ¶
func (g *GalleryImagesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImagesListResult.
type GalleryImagesUpdateRequest ¶
GalleryImagesUpdateRequest - The gallery images resource patch definition.
func (GalleryImagesUpdateRequest) MarshalJSON ¶
func (g GalleryImagesUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryImagesUpdateRequest.
func (*GalleryImagesUpdateRequest) UnmarshalJSON ¶
func (g *GalleryImagesUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImagesUpdateRequest.
type GalleryOSDiskImage ¶
type GalleryOSDiskImage struct { // READ-ONLY; This property indicates the size of the VHD to be created. SizeInMB *int64 }
GalleryOSDiskImage - This is the OS disk image.
func (GalleryOSDiskImage) MarshalJSON ¶
func (g GalleryOSDiskImage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GalleryOSDiskImage.
func (*GalleryOSDiskImage) UnmarshalJSON ¶
func (g *GalleryOSDiskImage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GalleryOSDiskImage.
type GuestAgent ¶
type GuestAgent struct { // REQUIRED; Resource properties. Properties *GuestAgentProperties // 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 }
GuestAgent - Defines the GuestAgent.
func (GuestAgent) MarshalJSON ¶
func (g GuestAgent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestAgent.
func (*GuestAgent) UnmarshalJSON ¶
func (g *GuestAgent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgent.
type GuestAgentClient ¶
type GuestAgentClient struct {
// contains filtered or unexported fields
}
GuestAgentClient contains the methods for the GuestAgent group. Don't use this type directly, use NewGuestAgentClient() instead.
func NewGuestAgentClient ¶
func NewGuestAgentClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GuestAgentClient, error)
NewGuestAgentClient creates a new instance of GuestAgentClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*GuestAgentClient) BeginCreate ¶
func (client *GuestAgentClient) BeginCreate(ctx context.Context, resourceURI string, options *GuestAgentClientBeginCreateOptions) (*runtime.Poller[GuestAgentClientCreateResponse], error)
BeginCreate - Create Or Update GuestAgent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - GuestAgentClientBeginCreateOptions contains the optional parameters for the GuestAgentClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/CreateGuestAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGuestAgentClient().BeginCreate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", &armazurestackhci.GuestAgentClientBeginCreateOptions{Body: &armazurestackhci.GuestAgent{ Properties: &armazurestackhci.GuestAgentProperties{ Credentials: &armazurestackhci.GuestCredential{ Password: to.Ptr("<password>"), Username: to.Ptr("tempuser"), }, ProvisioningAction: to.Ptr(armazurestackhci.ProvisioningActionInstall), }, }, }) 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.GuestAgent = armazurestackhci.GuestAgent{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances/guestAgents"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default"), // Properties: &armazurestackhci.GuestAgentProperties{ // ProvisioningAction: to.Ptr(armazurestackhci.ProvisioningActionInstall), // ProvisioningState: to.Ptr("Succeeded"), // Status: to.Ptr("connected"), // }, // }
Output:
func (*GuestAgentClient) BeginDelete ¶
func (client *GuestAgentClient) BeginDelete(ctx context.Context, resourceURI string, options *GuestAgentClientBeginDeleteOptions) (*runtime.Poller[GuestAgentClientDeleteResponse], error)
BeginDelete - Implements GuestAgent DELETE method. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - GuestAgentClientBeginDeleteOptions contains the optional parameters for the GuestAgentClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteGuestAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGuestAgentClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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 (*GuestAgentClient) Get ¶
func (client *GuestAgentClient) Get(ctx context.Context, resourceURI string, options *GuestAgentClientGetOptions) (GuestAgentClientGetResponse, error)
Get - Implements GuestAgent GET method. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - GuestAgentClientGetOptions contains the optional parameters for the GuestAgentClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetGuestAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGuestAgentClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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.GuestAgent = armazurestackhci.GuestAgent{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances/guestAgents"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default"), // Properties: &armazurestackhci.GuestAgentProperties{ // ProvisioningAction: to.Ptr(armazurestackhci.ProvisioningActionInstall), // ProvisioningState: to.Ptr("Succeeded"), // Status: to.Ptr("connected"), // }, // }
Output:
type GuestAgentClientBeginCreateOptions ¶
type GuestAgentClientBeginCreateOptions struct { // Request payload. Body *GuestAgent // Resumes the LRO from the provided token. ResumeToken string }
GuestAgentClientBeginCreateOptions contains the optional parameters for the GuestAgentClient.BeginCreate method.
type GuestAgentClientBeginDeleteOptions ¶
type GuestAgentClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GuestAgentClientBeginDeleteOptions contains the optional parameters for the GuestAgentClient.BeginDelete method.
type GuestAgentClientCreateResponse ¶
type GuestAgentClientCreateResponse struct { // Defines the GuestAgent. GuestAgent }
GuestAgentClientCreateResponse contains the response from method GuestAgentClient.BeginCreate.
type GuestAgentClientDeleteResponse ¶
type GuestAgentClientDeleteResponse struct { }
GuestAgentClientDeleteResponse contains the response from method GuestAgentClient.BeginDelete.
type GuestAgentClientGetOptions ¶
type GuestAgentClientGetOptions struct { }
GuestAgentClientGetOptions contains the optional parameters for the GuestAgentClient.Get method.
type GuestAgentClientGetResponse ¶
type GuestAgentClientGetResponse struct { // Defines the GuestAgent. GuestAgent }
GuestAgentClientGetResponse contains the response from method GuestAgentClient.Get.
type GuestAgentInstallStatus ¶
type GuestAgentInstallStatus struct { // READ-ONLY; The hybrid machine agent full version. AgentVersion *string // READ-ONLY; Details about the error state. ErrorDetails []*ErrorDetail // READ-ONLY; The time of the last status change. LastStatusChange *time.Time // READ-ONLY; The installation status of the hybrid machine agent installation. Status *StatusTypes // READ-ONLY; Specifies the VM's unique SMBIOS ID. VMUUID *string }
GuestAgentInstallStatus - Defines the status of a guest agent installation.
func (GuestAgentInstallStatus) MarshalJSON ¶
func (g GuestAgentInstallStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestAgentInstallStatus.
func (*GuestAgentInstallStatus) UnmarshalJSON ¶
func (g *GuestAgentInstallStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgentInstallStatus.
type GuestAgentList ¶
type GuestAgentList struct { // REQUIRED; Array of GuestAgent Value []*GuestAgent // Url to follow for getting next page of GuestAgent. NextLink *string }
GuestAgentList - List of GuestAgent.
func (GuestAgentList) MarshalJSON ¶
func (g GuestAgentList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestAgentList.
func (*GuestAgentList) UnmarshalJSON ¶
func (g *GuestAgentList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgentList.
type GuestAgentProperties ¶
type GuestAgentProperties struct { // Username / Password Credentials to provision guest agent. Credentials *GuestCredential // The guest agent provisioning action. ProvisioningAction *ProvisioningAction // READ-ONLY; The provisioning state. ProvisioningState *string // READ-ONLY; The guest agent status. Status *string }
GuestAgentProperties - Defines the resource properties.
func (GuestAgentProperties) MarshalJSON ¶
func (g GuestAgentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestAgentProperties.
func (*GuestAgentProperties) UnmarshalJSON ¶
func (g *GuestAgentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgentProperties.
type GuestAgentsClient ¶
type GuestAgentsClient struct {
// contains filtered or unexported fields
}
GuestAgentsClient contains the methods for the GuestAgents group. Don't use this type directly, use NewGuestAgentsClient() instead.
func NewGuestAgentsClient ¶
func NewGuestAgentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GuestAgentsClient, error)
NewGuestAgentsClient creates a new instance of GuestAgentsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*GuestAgentsClient) NewListPager ¶
func (client *GuestAgentsClient) NewListPager(resourceURI string, options *GuestAgentsClientListOptions) *runtime.Pager[GuestAgentsClientListResponse]
NewListPager - Returns the list of GuestAgent of the given vm.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - GuestAgentsClientListOptions contains the optional parameters for the GuestAgentsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GuestAgent_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGuestAgentsClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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.GuestAgentList = armazurestackhci.GuestAgentList{ // Value: []*armazurestackhci.GuestAgent{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances/guestAgents"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default"), // Properties: &armazurestackhci.GuestAgentProperties{ // ProvisioningAction: to.Ptr(armazurestackhci.ProvisioningActionInstall), // ProvisioningState: to.Ptr("Succeeded"), // Status: to.Ptr("connected"), // }, // }}, // } }
Output:
type GuestAgentsClientListOptions ¶
type GuestAgentsClientListOptions struct { }
GuestAgentsClientListOptions contains the optional parameters for the GuestAgentsClient.NewListPager method.
type GuestAgentsClientListResponse ¶
type GuestAgentsClientListResponse struct { // List of GuestAgent. GuestAgentList }
GuestAgentsClientListResponse contains the response from method GuestAgentsClient.NewListPager.
type GuestCredential ¶
type GuestCredential struct { // The password to connect with the guest. Password *string // The username to connect with the guest. Username *string }
GuestCredential - Username / Password Credentials to connect to guest.
func (GuestCredential) MarshalJSON ¶
func (g GuestCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestCredential.
func (*GuestCredential) UnmarshalJSON ¶
func (g *GuestCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestCredential.
type HTTPProxyConfiguration ¶
type HTTPProxyConfiguration struct { // The HTTP proxy server endpoint to use. HTTPProxy *string // The HTTPS proxy server endpoint to use. HTTPSProxy *string // The endpoints that should not go through proxy. NoProxy []*string // Alternative CA cert to use for connecting to proxy servers. TrustedCa *string }
HTTPProxyConfiguration - HTTP Proxy configuration for the VM.
func (HTTPProxyConfiguration) MarshalJSON ¶
func (h HTTPProxyConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPProxyConfiguration.
func (*HTTPProxyConfiguration) UnmarshalJSON ¶
func (h *HTTPProxyConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPProxyConfiguration.
type HardwareProfileUpdate ¶
type HardwareProfileUpdate struct { // RAM in MB for the virtual machine instance MemoryMB *int64 // number of processors for the virtual machine instance Processors *int32 VMSize *VMSizeEnum }
HardwareProfileUpdate - HardwareProfile - Specifies the hardware settings for the virtual machine instance.
func (HardwareProfileUpdate) MarshalJSON ¶
func (h HardwareProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareProfileUpdate.
func (*HardwareProfileUpdate) UnmarshalJSON ¶
func (h *HardwareProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfileUpdate.
type HybridIdentityMetadata ¶
type HybridIdentityMetadata struct { // REQUIRED; Resource properties. Properties *HybridIdentityMetadataProperties // 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 }
HybridIdentityMetadata - Defines the HybridIdentityMetadata.
func (HybridIdentityMetadata) MarshalJSON ¶
func (h HybridIdentityMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HybridIdentityMetadata.
func (*HybridIdentityMetadata) UnmarshalJSON ¶
func (h *HybridIdentityMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HybridIdentityMetadata.
type HybridIdentityMetadataClient ¶
type HybridIdentityMetadataClient struct {
// contains filtered or unexported fields
}
HybridIdentityMetadataClient contains the methods for the HybridIdentityMetadata group. Don't use this type directly, use NewHybridIdentityMetadataClient() instead.
func NewHybridIdentityMetadataClient ¶
func NewHybridIdentityMetadataClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*HybridIdentityMetadataClient, error)
NewHybridIdentityMetadataClient creates a new instance of HybridIdentityMetadataClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*HybridIdentityMetadataClient) Get ¶
func (client *HybridIdentityMetadataClient) Get(ctx context.Context, resourceURI string, options *HybridIdentityMetadataClientGetOptions) (HybridIdentityMetadataClientGetResponse, error)
Get - Implements HybridIdentityMetadata GET method. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetHybridIdentityMetadata.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewHybridIdentityMetadataClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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.HybridIdentityMetadata = armazurestackhci.HybridIdentityMetadata{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances/hybridIdentityMetadata"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata/default"), // Properties: &armazurestackhci.HybridIdentityMetadataProperties{ // Identity: &armazurestackhci.Identity{ // Type: to.Ptr("SystemAssigned"), // PrincipalID: to.Ptr("7b5129bc-8642-4a6a-95f8-63400ca6ec4d"), // TenantID: to.Ptr("ec46ca82-5d4a-4e3e-b4b7-e27f9318645d"), // }, // PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"), // }, // }
Output:
func (*HybridIdentityMetadataClient) NewListPager ¶
func (client *HybridIdentityMetadataClient) NewListPager(resourceURI string, options *HybridIdentityMetadataClientListOptions) *runtime.Pager[HybridIdentityMetadataClientListResponse]
NewListPager - Returns the list of HybridIdentityMetadata of the given vm.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - HybridIdentityMetadataClientListOptions contains the optional parameters for the HybridIdentityMetadataClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/HybridIdentityMetadata_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewHybridIdentityMetadataClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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.HybridIdentityMetadataList = armazurestackhci.HybridIdentityMetadataList{ // Value: []*armazurestackhci.HybridIdentityMetadata{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances/hybridIdentityMetadata"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata/default"), // Properties: &armazurestackhci.HybridIdentityMetadataProperties{ // Identity: &armazurestackhci.Identity{ // Type: to.Ptr("SystemAssigned"), // PrincipalID: to.Ptr("7b5129bc-8642-4a6a-95f8-63400ca6ec4d"), // TenantID: to.Ptr("ec46ca82-5d4a-4e3e-b4b7-e27f9318645d"), // }, // PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"), // }, // }}, // } }
Output:
type HybridIdentityMetadataClientGetOptions ¶
type HybridIdentityMetadataClientGetOptions struct { }
HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get method.
type HybridIdentityMetadataClientGetResponse ¶
type HybridIdentityMetadataClientGetResponse struct { // Defines the HybridIdentityMetadata. HybridIdentityMetadata }
HybridIdentityMetadataClientGetResponse contains the response from method HybridIdentityMetadataClient.Get.
type HybridIdentityMetadataClientListOptions ¶
type HybridIdentityMetadataClientListOptions struct { }
HybridIdentityMetadataClientListOptions contains the optional parameters for the HybridIdentityMetadataClient.NewListPager method.
type HybridIdentityMetadataClientListResponse ¶
type HybridIdentityMetadataClientListResponse struct { // List of HybridIdentityMetadata. HybridIdentityMetadataList }
HybridIdentityMetadataClientListResponse contains the response from method HybridIdentityMetadataClient.NewListPager.
type HybridIdentityMetadataList ¶
type HybridIdentityMetadataList struct { // REQUIRED; Array of HybridIdentityMetadata Value []*HybridIdentityMetadata // Url to follow for getting next page of HybridIdentityMetadata. NextLink *string }
HybridIdentityMetadataList - List of HybridIdentityMetadata.
func (HybridIdentityMetadataList) MarshalJSON ¶
func (h HybridIdentityMetadataList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HybridIdentityMetadataList.
func (*HybridIdentityMetadataList) UnmarshalJSON ¶
func (h *HybridIdentityMetadataList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HybridIdentityMetadataList.
type HybridIdentityMetadataProperties ¶
type HybridIdentityMetadataProperties struct { // The Public Key. PublicKey *string // The unique identifier for the resource. ResourceUID *string // READ-ONLY; Identity for the resource. Identity *Identity // READ-ONLY; The provisioning state. ProvisioningState *string }
HybridIdentityMetadataProperties - Defines the resource properties.
func (HybridIdentityMetadataProperties) MarshalJSON ¶
func (h HybridIdentityMetadataProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HybridIdentityMetadataProperties.
func (*HybridIdentityMetadataProperties) UnmarshalJSON ¶
func (h *HybridIdentityMetadataProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HybridIdentityMetadataProperties.
type HyperVGeneration ¶
type HyperVGeneration string
HyperVGeneration - The hypervisor generation of the Virtual Machine [V1, V2]
const ( HyperVGenerationV1 HyperVGeneration = "V1" HyperVGenerationV2 HyperVGeneration = "V2" )
func PossibleHyperVGenerationValues ¶
func PossibleHyperVGenerationValues() []HyperVGeneration
PossibleHyperVGenerationValues returns the possible values for the HyperVGeneration const type.
type IPAllocationMethodEnum ¶
type IPAllocationMethodEnum string
IPAllocationMethodEnum - IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic'
const ( IPAllocationMethodEnumDynamic IPAllocationMethodEnum = "Dynamic" IPAllocationMethodEnumStatic IPAllocationMethodEnum = "Static" )
func PossibleIPAllocationMethodEnumValues ¶
func PossibleIPAllocationMethodEnumValues() []IPAllocationMethodEnum
PossibleIPAllocationMethodEnumValues returns the possible values for the IPAllocationMethodEnum const type.
type IPConfiguration ¶
type IPConfiguration struct { // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string // InterfaceIPConfigurationPropertiesFormat properties of IP configuration. Properties *IPConfigurationProperties }
IPConfiguration - InterfaceIPConfiguration iPConfiguration in a network interface.
func (IPConfiguration) MarshalJSON ¶
func (i IPConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPConfiguration.
func (*IPConfiguration) UnmarshalJSON ¶
func (i *IPConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPConfiguration.
type IPConfigurationProperties ¶
type IPConfigurationProperties struct { // PrivateIPAddress - Private IP address of the IP configuration. PrivateIPAddress *string // Subnet - Name of Subnet bound to the IP configuration. Subnet *IPConfigurationPropertiesSubnet // READ-ONLY; Gateway for network interface Gateway *string // READ-ONLY; prefixLength for network interface PrefixLength *string }
IPConfigurationProperties - InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
func (IPConfigurationProperties) MarshalJSON ¶
func (i IPConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPConfigurationProperties.
func (*IPConfigurationProperties) UnmarshalJSON ¶
func (i *IPConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationProperties.
type IPConfigurationPropertiesSubnet ¶
type IPConfigurationPropertiesSubnet struct { // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/… ID *string }
IPConfigurationPropertiesSubnet - Subnet - Name of Subnet bound to the IP configuration.
func (IPConfigurationPropertiesSubnet) MarshalJSON ¶
func (i IPConfigurationPropertiesSubnet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPConfigurationPropertiesSubnet.
func (*IPConfigurationPropertiesSubnet) UnmarshalJSON ¶
func (i *IPConfigurationPropertiesSubnet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationPropertiesSubnet.
type IPPool ¶
type IPPool struct { // End of the IP address pool End *string // Type of the IP Pool [vm, vippool] IPPoolType *IPPoolTypeEnum Info *IPPoolInfo // Name of the IP-Pool Name *string // Start of the IP address pool Start *string }
func (IPPool) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type IPPool.
func (*IPPool) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type IPPool.
type IPPoolInfo ¶
type IPPoolInfo struct { // READ-ONLY; Number of IP addresses available in the IP Pool Available *string // READ-ONLY; Number of IP addresses allocated from the IP Pool Used *string }
func (IPPoolInfo) MarshalJSON ¶
func (i IPPoolInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPPoolInfo.
func (*IPPoolInfo) UnmarshalJSON ¶
func (i *IPPoolInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPPoolInfo.
type IPPoolTypeEnum ¶
type IPPoolTypeEnum string
IPPoolTypeEnum - Type of the IP Pool [vm, vippool]
const ( IPPoolTypeEnumVM IPPoolTypeEnum = "vm" IPPoolTypeEnumVippool IPPoolTypeEnum = "vippool" )
func PossibleIPPoolTypeEnumValues ¶
func PossibleIPPoolTypeEnumValues() []IPPoolTypeEnum
PossibleIPPoolTypeEnumValues returns the possible values for the IPPoolTypeEnum const type.
type Identity ¶
type Identity struct { // The identity type. Type *string // READ-ONLY; The principal ID of resource identity. PrincipalID *string // READ-ONLY; The tenant ID of resource. TenantID *string }
Identity for the resource.
func (Identity) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Identity.
func (*Identity) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Identity.
type InstanceViewStatus ¶
type InstanceViewStatus struct { // The status code. Code *string // The short localizable label for the status. DisplayStatus *string // The level code. Level *StatusLevelTypes // The detailed status message, including for alerts and error messages. Message *string // The time of the status. Time *time.Time }
InstanceViewStatus - Instance view status.
func (InstanceViewStatus) MarshalJSON ¶
func (i InstanceViewStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceViewStatus.
func (*InstanceViewStatus) UnmarshalJSON ¶
func (i *InstanceViewStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstanceViewStatus.
type InterfaceDNSSettings ¶
type InterfaceDNSSettings struct { // List of DNS server IP Addresses for the interface DNSServers []*string }
func (InterfaceDNSSettings) MarshalJSON ¶
func (i InterfaceDNSSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InterfaceDNSSettings.
func (*InterfaceDNSSettings) UnmarshalJSON ¶
func (i *InterfaceDNSSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceDNSSettings.
type LogicalNetworkProperties ¶
type LogicalNetworkProperties struct { // DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for // a subnet overrides logical network DHCP options. DhcpOptions *LogicalNetworkPropertiesDhcpOptions // Subnet - list of subnets under the logical network Subnets []*Subnet // name of the network switch to be used for VMs VMSwitchName *string // READ-ONLY; Provisioning state of the logical network. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of logical networks Status *LogicalNetworkStatus }
LogicalNetworkProperties - Properties under the logical network resource
func (LogicalNetworkProperties) MarshalJSON ¶
func (l LogicalNetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworkProperties.
func (*LogicalNetworkProperties) UnmarshalJSON ¶
func (l *LogicalNetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkProperties.
type LogicalNetworkPropertiesDhcpOptions ¶
type LogicalNetworkPropertiesDhcpOptions struct { // The list of DNS servers IP addresses. DNSServers []*string }
LogicalNetworkPropertiesDhcpOptions - DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP options.
func (LogicalNetworkPropertiesDhcpOptions) MarshalJSON ¶
func (l LogicalNetworkPropertiesDhcpOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworkPropertiesDhcpOptions.
func (*LogicalNetworkPropertiesDhcpOptions) UnmarshalJSON ¶
func (l *LogicalNetworkPropertiesDhcpOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkPropertiesDhcpOptions.
type LogicalNetworkStatus ¶
type LogicalNetworkStatus struct { // LogicalNetwork provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string ProvisioningStatus *LogicalNetworkStatusProvisioningStatus }
LogicalNetworkStatus - The observed state of logical networks
func (LogicalNetworkStatus) MarshalJSON ¶
func (l LogicalNetworkStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworkStatus.
func (*LogicalNetworkStatus) UnmarshalJSON ¶
func (l *LogicalNetworkStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkStatus.
type LogicalNetworkStatusProvisioningStatus ¶
type LogicalNetworkStatusProvisioningStatus struct { // The ID of the operation performed on the logical network OperationID *string // The status of the operation performed on the logical network [Succeeded, Failed, InProgress] Status *Status }
func (LogicalNetworkStatusProvisioningStatus) MarshalJSON ¶
func (l LogicalNetworkStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworkStatusProvisioningStatus.
func (*LogicalNetworkStatusProvisioningStatus) UnmarshalJSON ¶
func (l *LogicalNetworkStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkStatusProvisioningStatus.
type LogicalNetworks ¶
type LogicalNetworks struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Properties under the logical network resource Properties *LogicalNetworkProperties // 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 }
LogicalNetworks - The logical network resource definition.
func (LogicalNetworks) MarshalJSON ¶
func (l LogicalNetworks) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworks.
func (*LogicalNetworks) UnmarshalJSON ¶
func (l *LogicalNetworks) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworks.
type LogicalNetworksClient ¶
type LogicalNetworksClient struct {
// contains filtered or unexported fields
}
LogicalNetworksClient contains the methods for the LogicalNetworks group. Don't use this type directly, use NewLogicalNetworksClient() instead.
func NewLogicalNetworksClient ¶
func NewLogicalNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogicalNetworksClient, error)
NewLogicalNetworksClient creates a new instance of LogicalNetworksClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LogicalNetworksClient) BeginCreateOrUpdate ¶
func (client *LogicalNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, logicalNetworkName string, logicalNetworks LogicalNetworks, options *LogicalNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[LogicalNetworksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a logical network. Please note some properties can be set only during logical network creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- logicalNetworkName - Name of the logical network
- options - LogicalNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the LogicalNetworksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutLogicalNetwork.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLogicalNetworksClient().BeginCreateOrUpdate(ctx, "test-rg", "test-lnet", armazurestackhci.LogicalNetworks{ Location: to.Ptr("West US2"), ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, }, 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.LogicalNetworks = armazurestackhci.LogicalNetworks{ // Name: to.Ptr("test-lnet"), // Type: to.Ptr("Microsoft.AzureStackHCI/logicalNetworks"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.LogicalNetworkProperties{ // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*LogicalNetworksClient) BeginDelete ¶
func (client *LogicalNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, logicalNetworkName string, options *LogicalNetworksClientBeginDeleteOptions) (*runtime.Poller[LogicalNetworksClientDeleteResponse], error)
BeginDelete - The operation to delete a logical network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- logicalNetworkName - Name of the logical network
- options - LogicalNetworksClientBeginDeleteOptions contains the optional parameters for the LogicalNetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteLogicalNetwork.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLogicalNetworksClient().BeginDelete(ctx, "test-rg", "test-lnet", 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 (*LogicalNetworksClient) BeginUpdate ¶
func (client *LogicalNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, logicalNetworkName string, logicalNetworks LogicalNetworksUpdateRequest, options *LogicalNetworksClientBeginUpdateOptions) (*runtime.Poller[LogicalNetworksClientUpdateResponse], error)
BeginUpdate - The operation to update a logical network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- logicalNetworkName - Name of the logical network
- options - LogicalNetworksClientBeginUpdateOptions contains the optional parameters for the LogicalNetworksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateLogicalNetwork.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLogicalNetworksClient().BeginUpdate(ctx, "test-rg", "test-lnet", armazurestackhci.LogicalNetworksUpdateRequest{ Tags: map[string]*string{ "additionalProperties": to.Ptr("sample"), }, }, 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.LogicalNetworks = armazurestackhci.LogicalNetworks{ // Name: to.Ptr("test-lnet"), // Type: to.Ptr("Microsoft.AzureStackHCI/logicalNetworks"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"), // Location: to.Ptr("West US2"), // Tags: map[string]*string{ // "additionalProperties": to.Ptr("sample"), // }, // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.LogicalNetworkProperties{ // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*LogicalNetworksClient) Get ¶
func (client *LogicalNetworksClient) Get(ctx context.Context, resourceGroupName string, logicalNetworkName string, options *LogicalNetworksClientGetOptions) (LogicalNetworksClientGetResponse, error)
Get - If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- logicalNetworkName - Name of the logical network
- options - LogicalNetworksClientGetOptions contains the optional parameters for the LogicalNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetLogicalNetwork.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLogicalNetworksClient().Get(ctx, "test-rg", "test-lnet", 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.LogicalNetworks = armazurestackhci.LogicalNetworks{ // Name: to.Ptr("test-lnet"), // Type: to.Ptr("Microsoft.AzureStackHCI/logicalNetworks"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.LogicalNetworkProperties{ // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*LogicalNetworksClient) NewListAllPager ¶
func (client *LogicalNetworksClient) NewListAllPager(options *LogicalNetworksClientListAllOptions) *runtime.Pager[LogicalNetworksClientListAllResponse]
NewListAllPager - Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get the next page of logical networks.
Generated from API version 2023-09-01-preview
- options - LogicalNetworksClientListAllOptions contains the optional parameters for the LogicalNetworksClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListLogicalNetworkBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLogicalNetworksClient().NewListAllPager(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.LogicalNetworksListResult = armazurestackhci.LogicalNetworksListResult{ // Value: []*armazurestackhci.LogicalNetworks{ // { // Name: to.Ptr("test-lnet"), // Type: to.Ptr("Microsoft.AzureStackHCI/logicalNetworks"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.LogicalNetworkProperties{ // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
func (*LogicalNetworksClient) NewListPager ¶
func (client *LogicalNetworksClient) NewListPager(resourceGroupName string, options *LogicalNetworksClientListOptions) *runtime.Pager[LogicalNetworksClientListResponse]
NewListPager - Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to get the next page of logical networks.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - LogicalNetworksClientListOptions contains the optional parameters for the LogicalNetworksClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListLogicalNetworkByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLogicalNetworksClient().NewListPager("test-rg", 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.LogicalNetworksListResult = armazurestackhci.LogicalNetworksListResult{ // Value: []*armazurestackhci.LogicalNetworks{ // { // Name: to.Ptr("test-lnet"), // Type: to.Ptr("Microsoft.AzureStackHCI/logicalNetworks"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-lnet"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.LogicalNetworkProperties{ // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
type LogicalNetworksClientBeginCreateOrUpdateOptions ¶
type LogicalNetworksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LogicalNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the LogicalNetworksClient.BeginCreateOrUpdate method.
type LogicalNetworksClientBeginDeleteOptions ¶
type LogicalNetworksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LogicalNetworksClientBeginDeleteOptions contains the optional parameters for the LogicalNetworksClient.BeginDelete method.
type LogicalNetworksClientBeginUpdateOptions ¶
type LogicalNetworksClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LogicalNetworksClientBeginUpdateOptions contains the optional parameters for the LogicalNetworksClient.BeginUpdate method.
type LogicalNetworksClientCreateOrUpdateResponse ¶
type LogicalNetworksClientCreateOrUpdateResponse struct { // The logical network resource definition. LogicalNetworks }
LogicalNetworksClientCreateOrUpdateResponse contains the response from method LogicalNetworksClient.BeginCreateOrUpdate.
type LogicalNetworksClientDeleteResponse ¶
type LogicalNetworksClientDeleteResponse struct { }
LogicalNetworksClientDeleteResponse contains the response from method LogicalNetworksClient.BeginDelete.
type LogicalNetworksClientGetOptions ¶
type LogicalNetworksClientGetOptions struct { }
LogicalNetworksClientGetOptions contains the optional parameters for the LogicalNetworksClient.Get method.
type LogicalNetworksClientGetResponse ¶
type LogicalNetworksClientGetResponse struct { // The logical network resource definition. LogicalNetworks }
LogicalNetworksClientGetResponse contains the response from method LogicalNetworksClient.Get.
type LogicalNetworksClientListAllOptions ¶
type LogicalNetworksClientListAllOptions struct { }
LogicalNetworksClientListAllOptions contains the optional parameters for the LogicalNetworksClient.NewListAllPager method.
type LogicalNetworksClientListAllResponse ¶
type LogicalNetworksClientListAllResponse struct {
LogicalNetworksListResult
}
LogicalNetworksClientListAllResponse contains the response from method LogicalNetworksClient.NewListAllPager.
type LogicalNetworksClientListOptions ¶
type LogicalNetworksClientListOptions struct { }
LogicalNetworksClientListOptions contains the optional parameters for the LogicalNetworksClient.NewListPager method.
type LogicalNetworksClientListResponse ¶
type LogicalNetworksClientListResponse struct {
LogicalNetworksListResult
}
LogicalNetworksClientListResponse contains the response from method LogicalNetworksClient.NewListPager.
type LogicalNetworksClientUpdateResponse ¶
type LogicalNetworksClientUpdateResponse struct { // The logical network resource definition. LogicalNetworks }
LogicalNetworksClientUpdateResponse contains the response from method LogicalNetworksClient.BeginUpdate.
type LogicalNetworksListResult ¶
type LogicalNetworksListResult struct { NextLink *string Value []*LogicalNetworks }
func (LogicalNetworksListResult) MarshalJSON ¶
func (l LogicalNetworksListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworksListResult.
func (*LogicalNetworksListResult) UnmarshalJSON ¶
func (l *LogicalNetworksListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworksListResult.
type LogicalNetworksUpdateRequest ¶
LogicalNetworksUpdateRequest - The logical network resource patch definition.
func (LogicalNetworksUpdateRequest) MarshalJSON ¶
func (l LogicalNetworksUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalNetworksUpdateRequest.
func (*LogicalNetworksUpdateRequest) UnmarshalJSON ¶
func (l *LogicalNetworksUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworksUpdateRequest.
type MarketplaceGalleryImageProperties ¶
type MarketplaceGalleryImageProperties struct { // REQUIRED; Operating system type that the gallery image uses [Windows, Linux] OSType *OperatingSystemTypes // Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] CloudInitDataSource *CloudInitDataSource // Storage ContainerID of the storage container to be used for marketplace gallery image ContainerID *string // The hypervisor generation of the Virtual Machine [V1, V2] HyperVGeneration *HyperVGeneration // This is the gallery image definition identifier. Identifier *GalleryImageIdentifier // Specifies information about the gallery image version that you want to create or update. Version *GalleryImageVersion // READ-ONLY; Provisioning state of the marketplace gallery image. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of marketplace gallery images Status *MarketplaceGalleryImageStatus }
MarketplaceGalleryImageProperties - Properties under the marketplace gallery image resource
func (MarketplaceGalleryImageProperties) MarshalJSON ¶
func (m MarketplaceGalleryImageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImageProperties.
func (*MarketplaceGalleryImageProperties) UnmarshalJSON ¶
func (m *MarketplaceGalleryImageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImageProperties.
type MarketplaceGalleryImageStatus ¶
type MarketplaceGalleryImageStatus struct { // The download status of the gallery image DownloadStatus *MarketplaceGalleryImageStatusDownloadStatus // MarketplaceGalleryImage provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string // The progress of the operation in percentage ProgressPercentage *int64 ProvisioningStatus *MarketplaceGalleryImageStatusProvisioningStatus }
MarketplaceGalleryImageStatus - The observed state of marketplace gallery images
func (MarketplaceGalleryImageStatus) MarshalJSON ¶
func (m MarketplaceGalleryImageStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImageStatus.
func (*MarketplaceGalleryImageStatus) UnmarshalJSON ¶
func (m *MarketplaceGalleryImageStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImageStatus.
type MarketplaceGalleryImageStatusDownloadStatus ¶
type MarketplaceGalleryImageStatusDownloadStatus struct { // The downloaded sized of the image in MB DownloadSizeInMB *int64 }
MarketplaceGalleryImageStatusDownloadStatus - The download status of the gallery image
func (MarketplaceGalleryImageStatusDownloadStatus) MarshalJSON ¶
func (m MarketplaceGalleryImageStatusDownloadStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImageStatusDownloadStatus.
func (*MarketplaceGalleryImageStatusDownloadStatus) UnmarshalJSON ¶
func (m *MarketplaceGalleryImageStatusDownloadStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImageStatusDownloadStatus.
type MarketplaceGalleryImageStatusProvisioningStatus ¶
type MarketplaceGalleryImageStatusProvisioningStatus struct { // The ID of the operation performed on the gallery image OperationID *string // The status of the operation performed on the gallery image [Succeeded, Failed, InProgress] Status *Status }
func (MarketplaceGalleryImageStatusProvisioningStatus) MarshalJSON ¶
func (m MarketplaceGalleryImageStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImageStatusProvisioningStatus.
func (*MarketplaceGalleryImageStatusProvisioningStatus) UnmarshalJSON ¶
func (m *MarketplaceGalleryImageStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImageStatusProvisioningStatus.
type MarketplaceGalleryImages ¶
type MarketplaceGalleryImages struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Properties under the marketplace gallery image resource Properties *MarketplaceGalleryImageProperties // 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 }
MarketplaceGalleryImages - The marketplace gallery image resource definition.
func (MarketplaceGalleryImages) MarshalJSON ¶
func (m MarketplaceGalleryImages) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImages.
func (*MarketplaceGalleryImages) UnmarshalJSON ¶
func (m *MarketplaceGalleryImages) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImages.
type MarketplaceGalleryImagesClient ¶
type MarketplaceGalleryImagesClient struct {
// contains filtered or unexported fields
}
MarketplaceGalleryImagesClient contains the methods for the MarketplaceGalleryImages group. Don't use this type directly, use NewMarketplaceGalleryImagesClient() instead.
func NewMarketplaceGalleryImagesClient ¶
func NewMarketplaceGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MarketplaceGalleryImagesClient, error)
NewMarketplaceGalleryImagesClient creates a new instance of MarketplaceGalleryImagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MarketplaceGalleryImagesClient) BeginCreateOrUpdate ¶
func (client *MarketplaceGalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, marketplaceGalleryImageName string, marketplaceGalleryImages MarketplaceGalleryImages, options *MarketplaceGalleryImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[MarketplaceGalleryImagesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a marketplace gallery image. Please note some properties can be set only during marketplace gallery image creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- marketplaceGalleryImageName - Name of the marketplace gallery image
- options - MarketplaceGalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the MarketplaceGalleryImagesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutMarketplaceGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMarketplaceGalleryImagesClient().BeginCreateOrUpdate(ctx, "test-rg", "test-marketplace-gallery-image", armazurestackhci.MarketplaceGalleryImages{ Location: to.Ptr("West US2"), ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.MarketplaceGalleryImageProperties{ CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceAzure), ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), Identifier: &armazurestackhci.GalleryImageIdentifier{ Offer: to.Ptr("myOfferName"), Publisher: to.Ptr("myPublisherName"), SKU: to.Ptr("mySkuName"), }, OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), Version: &armazurestackhci.GalleryImageVersion{ Name: to.Ptr("1.0.0"), }, }, }, 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.MarketplaceGalleryImages = armazurestackhci.MarketplaceGalleryImages{ // Name: to.Ptr("test-marketplace-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/marketplaceGalleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.MarketplaceGalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceAzure), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), // Identifier: &armazurestackhci.GalleryImageIdentifier{ // Offer: to.Ptr("myOfferName"), // Publisher: to.Ptr("myPublisherName"), // SKU: to.Ptr("mySkuName"), // }, // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.MarketplaceGalleryImageStatus{ // DownloadStatus: &armazurestackhci.MarketplaceGalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](0), // ProvisioningStatus: &armazurestackhci.MarketplaceGalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusInProgress), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Name: to.Ptr("1.0.0"), // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }
Output:
func (*MarketplaceGalleryImagesClient) BeginDelete ¶
func (client *MarketplaceGalleryImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, marketplaceGalleryImageName string, options *MarketplaceGalleryImagesClientBeginDeleteOptions) (*runtime.Poller[MarketplaceGalleryImagesClientDeleteResponse], error)
BeginDelete - The operation to delete a marketplace gallery image. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- marketplaceGalleryImageName - Name of the marketplace gallery image
- options - MarketplaceGalleryImagesClientBeginDeleteOptions contains the optional parameters for the MarketplaceGalleryImagesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteMarketplaceGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMarketplaceGalleryImagesClient().BeginDelete(ctx, "test-rg", "test-marketplace-gallery-image", 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 (*MarketplaceGalleryImagesClient) BeginUpdate ¶
func (client *MarketplaceGalleryImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, marketplaceGalleryImageName string, marketplaceGalleryImages MarketplaceGalleryImagesUpdateRequest, options *MarketplaceGalleryImagesClientBeginUpdateOptions) (*runtime.Poller[MarketplaceGalleryImagesClientUpdateResponse], error)
BeginUpdate - The operation to update a marketplace gallery image. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- marketplaceGalleryImageName - Name of the marketplace gallery image
- options - MarketplaceGalleryImagesClientBeginUpdateOptions contains the optional parameters for the MarketplaceGalleryImagesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateMarketplaceGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMarketplaceGalleryImagesClient().BeginUpdate(ctx, "test-rg", "test-marketplce-gallery-image", armazurestackhci.MarketplaceGalleryImagesUpdateRequest{ Tags: map[string]*string{ "additionalProperties": to.Ptr("sample"), }, }, 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.MarketplaceGalleryImages = armazurestackhci.MarketplaceGalleryImages{ // Name: to.Ptr("test-marketplace-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/marketplaceGalleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), // Location: to.Ptr("West US2"), // Tags: map[string]*string{ // "additionalProperties": to.Ptr("sample"), // }, // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.MarketplaceGalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceAzure), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), // Identifier: &armazurestackhci.GalleryImageIdentifier{ // Offer: to.Ptr("myOfferName"), // Publisher: to.Ptr("myPublisherName"), // SKU: to.Ptr("mySkuName"), // }, // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.MarketplaceGalleryImageStatus{ // DownloadStatus: &armazurestackhci.MarketplaceGalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](0), // ProvisioningStatus: &armazurestackhci.MarketplaceGalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusInProgress), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Name: to.Ptr("1.0.0"), // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }
Output:
func (*MarketplaceGalleryImagesClient) Get ¶
func (client *MarketplaceGalleryImagesClient) Get(ctx context.Context, resourceGroupName string, marketplaceGalleryImageName string, options *MarketplaceGalleryImagesClientGetOptions) (MarketplaceGalleryImagesClientGetResponse, error)
Get - Gets a marketplace gallery image If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- marketplaceGalleryImageName - Name of the marketplace gallery image
- options - MarketplaceGalleryImagesClientGetOptions contains the optional parameters for the MarketplaceGalleryImagesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetMarketplaceGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMarketplaceGalleryImagesClient().Get(ctx, "test-rg", "test-marketplace-gallery-image", 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.MarketplaceGalleryImages = armazurestackhci.MarketplaceGalleryImages{ // Name: to.Ptr("test-marketplace-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/marketplaceGalleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.MarketplaceGalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceNoCloud), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), // Identifier: &armazurestackhci.GalleryImageIdentifier{ // Offer: to.Ptr("myOfferName"), // Publisher: to.Ptr("myPublisherName"), // SKU: to.Ptr("mySkuName"), // }, // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.MarketplaceGalleryImageStatus{ // DownloadStatus: &armazurestackhci.MarketplaceGalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.MarketplaceGalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Name: to.Ptr("1.0.0"), // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }
Output:
func (*MarketplaceGalleryImagesClient) NewListAllPager ¶
func (client *MarketplaceGalleryImagesClient) NewListAllPager(options *MarketplaceGalleryImagesClientListAllOptions) *runtime.Pager[MarketplaceGalleryImagesClientListAllResponse]
NewListAllPager - Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the response to get the next page of marketplace gallery images.
Generated from API version 2023-09-01-preview
- options - MarketplaceGalleryImagesClientListAllOptions contains the optional parameters for the MarketplaceGalleryImagesClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListMarketplaceGalleryImageBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMarketplaceGalleryImagesClient().NewListAllPager(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.MarketplaceGalleryImagesListResult = armazurestackhci.MarketplaceGalleryImagesListResult{ // Value: []*armazurestackhci.MarketplaceGalleryImages{ // { // Name: to.Ptr("test-marketplace-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/marketplaceGalleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.MarketplaceGalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceAzure), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), // Identifier: &armazurestackhci.GalleryImageIdentifier{ // Offer: to.Ptr("myOfferName"), // Publisher: to.Ptr("myPublisherName"), // SKU: to.Ptr("mySkuName"), // }, // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.MarketplaceGalleryImageStatus{ // DownloadStatus: &armazurestackhci.MarketplaceGalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.MarketplaceGalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Name: to.Ptr("1.0.0"), // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }}, // } }
Output:
func (*MarketplaceGalleryImagesClient) NewListPager ¶
func (client *MarketplaceGalleryImagesClient) NewListPager(resourceGroupName string, options *MarketplaceGalleryImagesClientListOptions) *runtime.Pager[MarketplaceGalleryImagesClientListResponse]
NewListPager - Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the response to get the next page of marketplace gallery images.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - MarketplaceGalleryImagesClientListOptions contains the optional parameters for the MarketplaceGalleryImagesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListMarketplaceGalleryImageByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMarketplaceGalleryImagesClient().NewListPager("test-rg", 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.MarketplaceGalleryImagesListResult = armazurestackhci.MarketplaceGalleryImagesListResult{ // Value: []*armazurestackhci.MarketplaceGalleryImages{ // { // Name: to.Ptr("test-marketplace-gallery-image"), // Type: to.Ptr("Microsoft.AzureStackHCI/marketplaceGalleryImages"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.MarketplaceGalleryImageProperties{ // CloudInitDataSource: to.Ptr(armazurestackhci.CloudInitDataSourceAzure), // ContainerID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container"), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV1), // Identifier: &armazurestackhci.GalleryImageIdentifier{ // Offer: to.Ptr("myOfferName"), // Publisher: to.Ptr("myPublisherName"), // SKU: to.Ptr("mySkuName"), // }, // OSType: to.Ptr(armazurestackhci.OperatingSystemTypesWindows), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // Status: &armazurestackhci.MarketplaceGalleryImageStatus{ // DownloadStatus: &armazurestackhci.MarketplaceGalleryImageStatusDownloadStatus{ // DownloadSizeInMB: to.Ptr[int64](9383), // }, // ProgressPercentage: to.Ptr[int64](100), // ProvisioningStatus: &armazurestackhci.MarketplaceGalleryImageStatusProvisioningStatus{ // OperationID: to.Ptr("79cfc696-44f5-4a68-a620-21850f7e9fb0"), // Status: to.Ptr(armazurestackhci.StatusSucceeded), // }, // }, // Version: &armazurestackhci.GalleryImageVersion{ // Name: to.Ptr("1.0.0"), // Properties: &armazurestackhci.GalleryImageVersionProperties{ // StorageProfile: &armazurestackhci.GalleryImageVersionStorageProfile{ // OSDiskImage: &armazurestackhci.GalleryOSDiskImage{ // SizeInMB: to.Ptr[int64](30270), // }, // }, // }, // }, // }, // }}, // } }
Output:
type MarketplaceGalleryImagesClientBeginCreateOrUpdateOptions ¶
type MarketplaceGalleryImagesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MarketplaceGalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the MarketplaceGalleryImagesClient.BeginCreateOrUpdate method.
type MarketplaceGalleryImagesClientBeginDeleteOptions ¶
type MarketplaceGalleryImagesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MarketplaceGalleryImagesClientBeginDeleteOptions contains the optional parameters for the MarketplaceGalleryImagesClient.BeginDelete method.
type MarketplaceGalleryImagesClientBeginUpdateOptions ¶
type MarketplaceGalleryImagesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MarketplaceGalleryImagesClientBeginUpdateOptions contains the optional parameters for the MarketplaceGalleryImagesClient.BeginUpdate method.
type MarketplaceGalleryImagesClientCreateOrUpdateResponse ¶
type MarketplaceGalleryImagesClientCreateOrUpdateResponse struct { // The marketplace gallery image resource definition. MarketplaceGalleryImages }
MarketplaceGalleryImagesClientCreateOrUpdateResponse contains the response from method MarketplaceGalleryImagesClient.BeginCreateOrUpdate.
type MarketplaceGalleryImagesClientDeleteResponse ¶
type MarketplaceGalleryImagesClientDeleteResponse struct { }
MarketplaceGalleryImagesClientDeleteResponse contains the response from method MarketplaceGalleryImagesClient.BeginDelete.
type MarketplaceGalleryImagesClientGetOptions ¶
type MarketplaceGalleryImagesClientGetOptions struct { }
MarketplaceGalleryImagesClientGetOptions contains the optional parameters for the MarketplaceGalleryImagesClient.Get method.
type MarketplaceGalleryImagesClientGetResponse ¶
type MarketplaceGalleryImagesClientGetResponse struct { // The marketplace gallery image resource definition. MarketplaceGalleryImages }
MarketplaceGalleryImagesClientGetResponse contains the response from method MarketplaceGalleryImagesClient.Get.
type MarketplaceGalleryImagesClientListAllOptions ¶
type MarketplaceGalleryImagesClientListAllOptions struct { }
MarketplaceGalleryImagesClientListAllOptions contains the optional parameters for the MarketplaceGalleryImagesClient.NewListAllPager method.
type MarketplaceGalleryImagesClientListAllResponse ¶
type MarketplaceGalleryImagesClientListAllResponse struct {
MarketplaceGalleryImagesListResult
}
MarketplaceGalleryImagesClientListAllResponse contains the response from method MarketplaceGalleryImagesClient.NewListAllPager.
type MarketplaceGalleryImagesClientListOptions ¶
type MarketplaceGalleryImagesClientListOptions struct { }
MarketplaceGalleryImagesClientListOptions contains the optional parameters for the MarketplaceGalleryImagesClient.NewListPager method.
type MarketplaceGalleryImagesClientListResponse ¶
type MarketplaceGalleryImagesClientListResponse struct {
MarketplaceGalleryImagesListResult
}
MarketplaceGalleryImagesClientListResponse contains the response from method MarketplaceGalleryImagesClient.NewListPager.
type MarketplaceGalleryImagesClientUpdateResponse ¶
type MarketplaceGalleryImagesClientUpdateResponse struct { // The marketplace gallery image resource definition. MarketplaceGalleryImages }
MarketplaceGalleryImagesClientUpdateResponse contains the response from method MarketplaceGalleryImagesClient.BeginUpdate.
type MarketplaceGalleryImagesListResult ¶
type MarketplaceGalleryImagesListResult struct { NextLink *string Value []*MarketplaceGalleryImages }
func (MarketplaceGalleryImagesListResult) MarshalJSON ¶
func (m MarketplaceGalleryImagesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImagesListResult.
func (*MarketplaceGalleryImagesListResult) UnmarshalJSON ¶
func (m *MarketplaceGalleryImagesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImagesListResult.
type MarketplaceGalleryImagesUpdateRequest ¶
MarketplaceGalleryImagesUpdateRequest - The marketplace gallery image resource patch definition.
func (MarketplaceGalleryImagesUpdateRequest) MarshalJSON ¶
func (m MarketplaceGalleryImagesUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MarketplaceGalleryImagesUpdateRequest.
func (*MarketplaceGalleryImagesUpdateRequest) UnmarshalJSON ¶
func (m *MarketplaceGalleryImagesUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceGalleryImagesUpdateRequest.
type NetworkInterfaceProperties ¶
type NetworkInterfaceProperties struct { // DNS Settings for the interface DNSSettings *InterfaceDNSSettings // IPConfigurations - A list of IPConfigurations of the network interface. IPConfigurations []*IPConfiguration // MacAddress - The MAC address of the network interface. MacAddress *string // READ-ONLY; Provisioning state of the network interface. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of network interfaces Status *NetworkInterfaceStatus }
NetworkInterfaceProperties - Properties under the network interface resource
func (NetworkInterfaceProperties) MarshalJSON ¶
func (n NetworkInterfaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceProperties.
func (*NetworkInterfaceProperties) UnmarshalJSON ¶
func (n *NetworkInterfaceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceProperties.
type NetworkInterfaceStatus ¶
type NetworkInterfaceStatus struct { // NetworkInterface provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string ProvisioningStatus *NetworkInterfaceStatusProvisioningStatus }
NetworkInterfaceStatus - The observed state of network interfaces
func (NetworkInterfaceStatus) MarshalJSON ¶
func (n NetworkInterfaceStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceStatus.
func (*NetworkInterfaceStatus) UnmarshalJSON ¶
func (n *NetworkInterfaceStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceStatus.
type NetworkInterfaceStatusProvisioningStatus ¶
type NetworkInterfaceStatusProvisioningStatus struct { // The ID of the operation performed on the network interface OperationID *string // The status of the operation performed on the network interface [Succeeded, Failed, InProgress] Status *Status }
func (NetworkInterfaceStatusProvisioningStatus) MarshalJSON ¶
func (n NetworkInterfaceStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceStatusProvisioningStatus.
func (*NetworkInterfaceStatusProvisioningStatus) UnmarshalJSON ¶
func (n *NetworkInterfaceStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceStatusProvisioningStatus.
type NetworkInterfaces ¶
type NetworkInterfaces struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Properties under the network interface resource Properties *NetworkInterfaceProperties // 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 }
NetworkInterfaces - The network interface resource definition.
func (NetworkInterfaces) MarshalJSON ¶
func (n NetworkInterfaces) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaces.
func (*NetworkInterfaces) UnmarshalJSON ¶
func (n *NetworkInterfaces) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaces.
type NetworkInterfacesClient ¶
type NetworkInterfacesClient struct {
// contains filtered or unexported fields
}
NetworkInterfacesClient contains the methods for the NetworkInterfaces group. Don't use this type directly, use NewNetworkInterfacesClient() instead.
func NewNetworkInterfacesClient ¶
func NewNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkInterfacesClient, error)
NewNetworkInterfacesClient creates a new instance of NetworkInterfacesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*NetworkInterfacesClient) BeginCreateOrUpdate ¶
func (client *NetworkInterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, networkInterfaces NetworkInterfaces, options *NetworkInterfacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NetworkInterfacesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a network interface. Please note some properties can be set only during network interface creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- networkInterfaceName - Name of the network interface
- options - NetworkInterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkInterfacesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutNetworkInterface.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNetworkInterfacesClient().BeginCreateOrUpdate(ctx, "test-rg", "test-nic", armazurestackhci.NetworkInterfaces{ Location: to.Ptr("West US2"), ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.NetworkInterfaceProperties{ IPConfigurations: []*armazurestackhci.IPConfiguration{ { Name: to.Ptr("ipconfig-sample"), Properties: &armazurestackhci.IPConfigurationProperties{ Subnet: &armazurestackhci.IPConfigurationPropertiesSubnet{ ID: to.Ptr("test-lnet"), }, }, }}, }, }, 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.NetworkInterfaces = armazurestackhci.NetworkInterfaces{ // Name: to.Ptr("test-nic"), // Type: to.Ptr("Microsoft.AzureStackHCI/networkInterfaces"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.NetworkInterfaceProperties{ // IPConfigurations: []*armazurestackhci.IPConfiguration{ // { // Name: to.Ptr("ipconfig-sample"), // Properties: &armazurestackhci.IPConfigurationProperties{ // Subnet: &armazurestackhci.IPConfigurationPropertiesSubnet{ // ID: to.Ptr("test-lnet"), // }, // }, // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*NetworkInterfacesClient) BeginDelete ¶
func (client *NetworkInterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *NetworkInterfacesClientBeginDeleteOptions) (*runtime.Poller[NetworkInterfacesClientDeleteResponse], error)
BeginDelete - The operation to delete a network interface. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- networkInterfaceName - Name of the network interface
- options - NetworkInterfacesClientBeginDeleteOptions contains the optional parameters for the NetworkInterfacesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteNetworkInterface.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNetworkInterfacesClient().BeginDelete(ctx, "test-rg", "test-nic", 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 (*NetworkInterfacesClient) BeginUpdate ¶
func (client *NetworkInterfacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, networkInterfaces NetworkInterfacesUpdateRequest, options *NetworkInterfacesClientBeginUpdateOptions) (*runtime.Poller[NetworkInterfacesClientUpdateResponse], error)
BeginUpdate - The operation to update a network interface. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- networkInterfaceName - Name of the network interface
- options - NetworkInterfacesClientBeginUpdateOptions contains the optional parameters for the NetworkInterfacesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateNetworkInterface.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNetworkInterfacesClient().BeginUpdate(ctx, "test-rg", "test-nic", armazurestackhci.NetworkInterfacesUpdateRequest{ Tags: map[string]*string{ "additionalProperties": to.Ptr("sample"), }, }, 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.NetworkInterfaces = armazurestackhci.NetworkInterfaces{ // Name: to.Ptr("test-nic"), // Type: to.Ptr("Microsoft.AzureStackHCI/networkInterfaces"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.NetworkInterfaceProperties{ // IPConfigurations: []*armazurestackhci.IPConfiguration{ // { // Name: to.Ptr("ipconfig-sample"), // Properties: &armazurestackhci.IPConfigurationProperties{ // Subnet: &armazurestackhci.IPConfigurationPropertiesSubnet{ // ID: to.Ptr("test-lnet"), // }, // }, // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*NetworkInterfacesClient) Get ¶
func (client *NetworkInterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *NetworkInterfacesClientGetOptions) (NetworkInterfacesClientGetResponse, error)
Get - Gets a network interface If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- networkInterfaceName - Name of the network interface
- options - NetworkInterfacesClientGetOptions contains the optional parameters for the NetworkInterfacesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetNetworkInterface.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNetworkInterfacesClient().Get(ctx, "test-rg", "test-nic", 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.NetworkInterfaces = armazurestackhci.NetworkInterfaces{ // Name: to.Ptr("test-nic"), // Type: to.Ptr("Microsoft.AzureStackHCI/networkInterfaces"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.NetworkInterfaceProperties{ // IPConfigurations: []*armazurestackhci.IPConfiguration{ // { // Name: to.Ptr("ipconfig-sample"), // Properties: &armazurestackhci.IPConfigurationProperties{ // Subnet: &armazurestackhci.IPConfigurationPropertiesSubnet{ // ID: to.Ptr("external"), // }, // }, // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*NetworkInterfacesClient) NewListAllPager ¶
func (client *NetworkInterfacesClient) NewListAllPager(options *NetworkInterfacesClientListAllOptions) *runtime.Pager[NetworkInterfacesClientListAllResponse]
NewListAllPager - Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to get the next page of network interfaces.
Generated from API version 2023-09-01-preview
- options - NetworkInterfacesClientListAllOptions contains the optional parameters for the NetworkInterfacesClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListNetworkInterfaceBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNetworkInterfacesClient().NewListAllPager(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.NetworkInterfacesListResult = armazurestackhci.NetworkInterfacesListResult{ // Value: []*armazurestackhci.NetworkInterfaces{ // { // Name: to.Ptr("test-nic"), // Type: to.Ptr("Microsoft.AzureStackHCI/networkInterfaces"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.NetworkInterfaceProperties{ // IPConfigurations: []*armazurestackhci.IPConfiguration{ // { // Name: to.Ptr("ipconfig-sample"), // Properties: &armazurestackhci.IPConfigurationProperties{ // Subnet: &armazurestackhci.IPConfigurationPropertiesSubnet{ // ID: to.Ptr("external"), // }, // }, // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
func (*NetworkInterfacesClient) NewListPager ¶
func (client *NetworkInterfacesClient) NewListPager(resourceGroupName string, options *NetworkInterfacesClientListOptions) *runtime.Pager[NetworkInterfacesClientListResponse]
NewListPager - Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to get the next page of network interfaces.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - NetworkInterfacesClientListOptions contains the optional parameters for the NetworkInterfacesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListNetworkInterfaceByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNetworkInterfacesClient().NewListPager("test-rg", 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.NetworkInterfacesListResult = armazurestackhci.NetworkInterfacesListResult{ // Value: []*armazurestackhci.NetworkInterfaces{ // { // Name: to.Ptr("test-nic"), // Type: to.Ptr("Microsoft.AzureStackHCI/networkInterfaces"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.NetworkInterfaceProperties{ // IPConfigurations: []*armazurestackhci.IPConfiguration{ // { // Name: to.Ptr("ipconfig-sample"), // Properties: &armazurestackhci.IPConfigurationProperties{ // Subnet: &armazurestackhci.IPConfigurationPropertiesSubnet{ // ID: to.Ptr("external"), // }, // }, // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
type NetworkInterfacesClientBeginCreateOrUpdateOptions ¶
type NetworkInterfacesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkInterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkInterfacesClient.BeginCreateOrUpdate method.
type NetworkInterfacesClientBeginDeleteOptions ¶
type NetworkInterfacesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkInterfacesClientBeginDeleteOptions contains the optional parameters for the NetworkInterfacesClient.BeginDelete method.
type NetworkInterfacesClientBeginUpdateOptions ¶
type NetworkInterfacesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkInterfacesClientBeginUpdateOptions contains the optional parameters for the NetworkInterfacesClient.BeginUpdate method.
type NetworkInterfacesClientCreateOrUpdateResponse ¶
type NetworkInterfacesClientCreateOrUpdateResponse struct { // The network interface resource definition. NetworkInterfaces }
NetworkInterfacesClientCreateOrUpdateResponse contains the response from method NetworkInterfacesClient.BeginCreateOrUpdate.
type NetworkInterfacesClientDeleteResponse ¶
type NetworkInterfacesClientDeleteResponse struct { }
NetworkInterfacesClientDeleteResponse contains the response from method NetworkInterfacesClient.BeginDelete.
type NetworkInterfacesClientGetOptions ¶
type NetworkInterfacesClientGetOptions struct { }
NetworkInterfacesClientGetOptions contains the optional parameters for the NetworkInterfacesClient.Get method.
type NetworkInterfacesClientGetResponse ¶
type NetworkInterfacesClientGetResponse struct { // The network interface resource definition. NetworkInterfaces }
NetworkInterfacesClientGetResponse contains the response from method NetworkInterfacesClient.Get.
type NetworkInterfacesClientListAllOptions ¶
type NetworkInterfacesClientListAllOptions struct { }
NetworkInterfacesClientListAllOptions contains the optional parameters for the NetworkInterfacesClient.NewListAllPager method.
type NetworkInterfacesClientListAllResponse ¶
type NetworkInterfacesClientListAllResponse struct {
NetworkInterfacesListResult
}
NetworkInterfacesClientListAllResponse contains the response from method NetworkInterfacesClient.NewListAllPager.
type NetworkInterfacesClientListOptions ¶
type NetworkInterfacesClientListOptions struct { }
NetworkInterfacesClientListOptions contains the optional parameters for the NetworkInterfacesClient.NewListPager method.
type NetworkInterfacesClientListResponse ¶
type NetworkInterfacesClientListResponse struct {
NetworkInterfacesListResult
}
NetworkInterfacesClientListResponse contains the response from method NetworkInterfacesClient.NewListPager.
type NetworkInterfacesClientUpdateResponse ¶
type NetworkInterfacesClientUpdateResponse struct { // The network interface resource definition. NetworkInterfaces }
NetworkInterfacesClientUpdateResponse contains the response from method NetworkInterfacesClient.BeginUpdate.
type NetworkInterfacesListResult ¶
type NetworkInterfacesListResult struct { NextLink *string Value []*NetworkInterfaces }
func (NetworkInterfacesListResult) MarshalJSON ¶
func (n NetworkInterfacesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfacesListResult.
func (*NetworkInterfacesListResult) UnmarshalJSON ¶
func (n *NetworkInterfacesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfacesListResult.
type NetworkInterfacesUpdateRequest ¶
NetworkInterfacesUpdateRequest - The network interface resource patch definition.
func (NetworkInterfacesUpdateRequest) MarshalJSON ¶
func (n NetworkInterfacesUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfacesUpdateRequest.
func (*NetworkInterfacesUpdateRequest) UnmarshalJSON ¶
func (n *NetworkInterfacesUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfacesUpdateRequest.
type NetworkProfileUpdate ¶
type NetworkProfileUpdate struct { // NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance NetworkInterfaces []*NetworkProfileUpdateNetworkInterfacesItem }
NetworkProfileUpdate - NetworkProfile - describes the network update configuration the virtual machine instance
func (NetworkProfileUpdate) MarshalJSON ¶
func (n NetworkProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfileUpdate.
func (*NetworkProfileUpdate) UnmarshalJSON ¶
func (n *NetworkProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileUpdate.
type NetworkProfileUpdateNetworkInterfacesItem ¶
type NetworkProfileUpdateNetworkInterfacesItem struct { // ID - Resource ID of the network interface ID *string }
func (NetworkProfileUpdateNetworkInterfacesItem) MarshalJSON ¶
func (n NetworkProfileUpdateNetworkInterfacesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfileUpdateNetworkInterfacesItem.
func (*NetworkProfileUpdateNetworkInterfacesItem) UnmarshalJSON ¶
func (n *NetworkProfileUpdateNetworkInterfacesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileUpdateNetworkInterfacesItem.
type OperatingSystemTypes ¶
type OperatingSystemTypes string
OperatingSystemTypes - Operating system type that the gallery image uses [Windows, Linux]
const ( OperatingSystemTypesLinux OperatingSystemTypes = "Linux" OperatingSystemTypesWindows OperatingSystemTypes = "Windows" )
func PossibleOperatingSystemTypesValues ¶
func PossibleOperatingSystemTypesValues() []OperatingSystemTypes
PossibleOperatingSystemTypesValues returns the possible values for the OperatingSystemTypes const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
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 { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular 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 { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link 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 - List all the supported operations.
Generated from API version 2023-09-01-preview
- 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/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.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 = armazurestackhci.OperationListResult{ // Value: []*armazurestackhci.Operation{ // { // Name: to.Ptr("Microsoft.AzureStackHCI/galleryImages/read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("List or get the Addresses"), // Operation: to.Ptr("List or Get Addresses"), // Provider: to.Ptr("Azure Stack HCI"), // Resource: to.Ptr("GalleryImages"), // }, // IsDataAction: to.Ptr(false), // Origin: to.Ptr(armazurestackhci.OriginUser), // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type OsProfileUpdate ¶
type OsProfileUpdate struct { // ComputerName - name of the computer ComputerName *string LinuxConfiguration *OsProfileUpdateLinuxConfiguration WindowsConfiguration *OsProfileUpdateWindowsConfiguration }
OsProfileUpdate - OsProfile - describes the update configuration of the operating system
func (OsProfileUpdate) MarshalJSON ¶
func (o OsProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsProfileUpdate.
func (*OsProfileUpdate) UnmarshalJSON ¶
func (o *OsProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfileUpdate.
type OsProfileUpdateLinuxConfiguration ¶
type OsProfileUpdateLinuxConfiguration struct { // Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation // process. ProvisionVMAgent *bool // Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ProvisionVMConfigAgent *bool }
func (OsProfileUpdateLinuxConfiguration) MarshalJSON ¶
func (o OsProfileUpdateLinuxConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsProfileUpdateLinuxConfiguration.
func (*OsProfileUpdateLinuxConfiguration) UnmarshalJSON ¶
func (o *OsProfileUpdateLinuxConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfileUpdateLinuxConfiguration.
type OsProfileUpdateWindowsConfiguration ¶
type OsProfileUpdateWindowsConfiguration struct { // Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation // process. ProvisionVMAgent *bool // Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ProvisionVMConfigAgent *bool }
func (OsProfileUpdateWindowsConfiguration) MarshalJSON ¶
func (o OsProfileUpdateWindowsConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsProfileUpdateWindowsConfiguration.
func (*OsProfileUpdateWindowsConfiguration) UnmarshalJSON ¶
func (o *OsProfileUpdateWindowsConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfileUpdateWindowsConfiguration.
type PowerStateEnum ¶
type PowerStateEnum string
PowerStateEnum - The power state of the virtual machine instance
const ( PowerStateEnumDeallocated PowerStateEnum = "Deallocated" PowerStateEnumDeallocating PowerStateEnum = "Deallocating" PowerStateEnumRunning PowerStateEnum = "Running" PowerStateEnumStarting PowerStateEnum = "Starting" PowerStateEnumStopped PowerStateEnum = "Stopped" PowerStateEnumStopping PowerStateEnum = "Stopping" PowerStateEnumUnknown PowerStateEnum = "Unknown" )
func PossiblePowerStateEnumValues ¶
func PossiblePowerStateEnumValues() []PowerStateEnum
PossiblePowerStateEnumValues returns the possible values for the PowerStateEnum const type.
type ProvisioningAction ¶
type ProvisioningAction string
ProvisioningAction - Defines the different types of operations for guest agent.
const ( ProvisioningActionInstall ProvisioningAction = "install" ProvisioningActionRepair ProvisioningAction = "repair" ProvisioningActionUninstall ProvisioningAction = "uninstall" )
func PossibleProvisioningActionValues ¶
func PossibleProvisioningActionValues() []ProvisioningAction
PossibleProvisioningActionValues returns the possible values for the ProvisioningAction const type.
type ProvisioningStateEnum ¶
type ProvisioningStateEnum string
ProvisioningStateEnum - Provisioning state of the gallery image.
const ( ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" )
func PossibleProvisioningStateEnumValues ¶
func PossibleProvisioningStateEnumValues() []ProvisioningStateEnum
PossibleProvisioningStateEnumValues returns the possible values for the ProvisioningStateEnum const type.
type Route ¶
type Route struct { // Name - name of the subnet Name *string // Properties of the route. Properties *RoutePropertiesFormat }
Route - Route resource.
func (Route) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Route.
func (*Route) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Route.
type RoutePropertiesFormat ¶
type RoutePropertiesFormat struct { // The destination CIDR to which the route applies. AddressPrefix *string // The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. NextHopIPAddress *string }
RoutePropertiesFormat - Route resource.
func (RoutePropertiesFormat) MarshalJSON ¶
func (r RoutePropertiesFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutePropertiesFormat.
func (*RoutePropertiesFormat) UnmarshalJSON ¶
func (r *RoutePropertiesFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutePropertiesFormat.
type RouteTable ¶
type RouteTable struct { // Properties of the route table. Properties *RouteTablePropertiesFormat // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RouteTable - Route table resource.
func (RouteTable) MarshalJSON ¶
func (r RouteTable) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RouteTable.
func (*RouteTable) UnmarshalJSON ¶
func (r *RouteTable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RouteTable.
type RouteTablePropertiesFormat ¶
type RouteTablePropertiesFormat struct { // Collection of routes contained within a route table. Routes []*Route }
RouteTablePropertiesFormat - Route Table resource.
func (RouteTablePropertiesFormat) MarshalJSON ¶
func (r RouteTablePropertiesFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RouteTablePropertiesFormat.
func (*RouteTablePropertiesFormat) UnmarshalJSON ¶
func (r *RouteTablePropertiesFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RouteTablePropertiesFormat.
type SSHConfiguration ¶
type SSHConfiguration struct { // The list of SSH public keys used to authenticate with linux based VMs. PublicKeys []*SSHPublicKey }
SSHConfiguration - SSH configuration for Linux based VMs running on Azure
func (SSHConfiguration) MarshalJSON ¶
func (s SSHConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHConfiguration.
func (*SSHConfiguration) UnmarshalJSON ¶
func (s *SSHConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHConfiguration.
type SSHPublicKey ¶
type SSHPublicKey struct { // SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa // format. // For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). KeyData *string // Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key // is appended to the file. Example: /home/user/.ssh/authorized_keys Path *string }
SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
func (SSHPublicKey) MarshalJSON ¶
func (s SSHPublicKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
func (*SSHPublicKey) UnmarshalJSON ¶
func (s *SSHPublicKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
type SecurityTypes ¶
type SecurityTypes string
SecurityTypes - Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function.
const ( SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM" SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" )
func PossibleSecurityTypesValues ¶
func PossibleSecurityTypesValues() []SecurityTypes
PossibleSecurityTypesValues returns the possible values for the SecurityTypes const type.
type Status ¶
type Status string
Status - The status of the operation performed on the gallery image [Succeeded, Failed, InProgress]
func PossibleStatusValues ¶
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type StatusLevelTypes ¶
type StatusLevelTypes string
StatusLevelTypes - The level code.
const ( StatusLevelTypesError StatusLevelTypes = "Error" StatusLevelTypesInfo StatusLevelTypes = "Info" StatusLevelTypesWarning StatusLevelTypes = "Warning" )
func PossibleStatusLevelTypesValues ¶
func PossibleStatusLevelTypesValues() []StatusLevelTypes
PossibleStatusLevelTypesValues returns the possible values for the StatusLevelTypes const type.
type StatusTypes ¶
type StatusTypes string
StatusTypes - The installation status of the hybrid machine agent installation.
const ( StatusTypesFailed StatusTypes = "Failed" StatusTypesInProgress StatusTypes = "InProgress" StatusTypesSucceeded StatusTypes = "Succeeded" )
func PossibleStatusTypesValues ¶
func PossibleStatusTypesValues() []StatusTypes
PossibleStatusTypesValues returns the possible values for the StatusTypes const type.
type StorageContainerProperties ¶
type StorageContainerProperties struct { // REQUIRED; Path of the storage container on the disk Path *string // READ-ONLY; Provisioning state of the storage container. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of storage containers Status *StorageContainerStatus }
StorageContainerProperties - Properties under the storage container resource
func (StorageContainerProperties) MarshalJSON ¶
func (s StorageContainerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageContainerProperties.
func (*StorageContainerProperties) UnmarshalJSON ¶
func (s *StorageContainerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageContainerProperties.
type StorageContainerStatus ¶
type StorageContainerStatus struct { // Amount of space available on the disk in MB AvailableSizeMB *int64 // Total size of the disk in MB ContainerSizeMB *int64 // StorageContainer provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string ProvisioningStatus *StorageContainerStatusProvisioningStatus }
StorageContainerStatus - The observed state of storage containers
func (StorageContainerStatus) MarshalJSON ¶
func (s StorageContainerStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageContainerStatus.
func (*StorageContainerStatus) UnmarshalJSON ¶
func (s *StorageContainerStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageContainerStatus.
type StorageContainerStatusProvisioningStatus ¶
type StorageContainerStatusProvisioningStatus struct { // The ID of the operation performed on the storage container OperationID *string // The status of the operation performed on the storage container [Succeeded, Failed, InProgress] Status *Status }
func (StorageContainerStatusProvisioningStatus) MarshalJSON ¶
func (s StorageContainerStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageContainerStatusProvisioningStatus.
func (*StorageContainerStatusProvisioningStatus) UnmarshalJSON ¶
func (s *StorageContainerStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageContainerStatusProvisioningStatus.
type StorageContainers ¶
type StorageContainers struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Properties under the storage container resource Properties *StorageContainerProperties // 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 }
StorageContainers - The storage container resource definition.
func (StorageContainers) MarshalJSON ¶
func (s StorageContainers) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageContainers.
func (*StorageContainers) UnmarshalJSON ¶
func (s *StorageContainers) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageContainers.
type StorageContainersClient ¶
type StorageContainersClient struct {
// contains filtered or unexported fields
}
StorageContainersClient contains the methods for the StorageContainers group. Don't use this type directly, use NewStorageContainersClient() instead.
func NewStorageContainersClient ¶
func NewStorageContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageContainersClient, error)
NewStorageContainersClient creates a new instance of StorageContainersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StorageContainersClient) BeginCreateOrUpdate ¶
func (client *StorageContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, storageContainerName string, storageContainers StorageContainers, options *StorageContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageContainersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a storage container. Please note some properties can be set only during storage container creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageContainerName - Name of the storage container
- options - StorageContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageContainersClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutStorageContainer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageContainersClient().BeginCreateOrUpdate(ctx, "test-rg", "Default_Container", armazurestackhci.StorageContainers{ Location: to.Ptr("West US2"), ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.StorageContainerProperties{ Path: to.Ptr("C:\\container_storage"), }, }, 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.StorageContainers = armazurestackhci.StorageContainers{ // Name: to.Ptr("Default_Container"), // Type: to.Ptr("Microsoft.AzureStackHCI/storageContainers"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-galimg3325"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.StorageContainerProperties{ // Path: to.Ptr("C:\\container_storage"), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*StorageContainersClient) BeginDelete ¶
func (client *StorageContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, storageContainerName string, options *StorageContainersClientBeginDeleteOptions) (*runtime.Poller[StorageContainersClientDeleteResponse], error)
BeginDelete - The operation to delete a storage container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageContainerName - Name of the storage container
- options - StorageContainersClientBeginDeleteOptions contains the optional parameters for the StorageContainersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteStorageContainer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageContainersClient().BeginDelete(ctx, "test-rg", "Default_Container", 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 (*StorageContainersClient) BeginUpdate ¶
func (client *StorageContainersClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageContainerName string, storageContainers StorageContainersUpdateRequest, options *StorageContainersClientBeginUpdateOptions) (*runtime.Poller[StorageContainersClientUpdateResponse], error)
BeginUpdate - The operation to update a storage container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageContainerName - Name of the storage container
- options - StorageContainersClientBeginUpdateOptions contains the optional parameters for the StorageContainersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateStorageContainer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageContainersClient().BeginUpdate(ctx, "test-rg", "Default_Container", armazurestackhci.StorageContainersUpdateRequest{ Tags: map[string]*string{ "additionalProperties": to.Ptr("sample"), }, }, 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.StorageContainers = armazurestackhci.StorageContainers{ // Name: to.Ptr("Default_Container"), // Type: to.Ptr("Microsoft.AzureStackHCI/storageContainers"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-galimg3325"), // Location: to.Ptr("West US2"), // Tags: map[string]*string{ // "additionalProperties": to.Ptr("sample"), // }, // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.StorageContainerProperties{ // Path: to.Ptr("C:\\container_storage"), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*StorageContainersClient) Get ¶
func (client *StorageContainersClient) Get(ctx context.Context, resourceGroupName string, storageContainerName string, options *StorageContainersClientGetOptions) (StorageContainersClientGetResponse, error)
Get - Gets a storage container If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageContainerName - Name of the storage container
- options - StorageContainersClientGetOptions contains the optional parameters for the StorageContainersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetStorageContainer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStorageContainersClient().Get(ctx, "test-rg", "Default_Container", 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.StorageContainers = armazurestackhci.StorageContainers{ // Name: to.Ptr("Default_Container"), // Type: to.Ptr("Microsoft.AzureStackHCI/storageContainers"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/Default_Container"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.StorageContainerProperties{ // Path: to.Ptr("C:\\container_storage"), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*StorageContainersClient) NewListAllPager ¶
func (client *StorageContainersClient) NewListAllPager(options *StorageContainersClientListAllOptions) *runtime.Pager[StorageContainersClientListAllResponse]
NewListAllPager - Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to get the next page of storage containers.
Generated from API version 2023-09-01-preview
- options - StorageContainersClientListAllOptions contains the optional parameters for the StorageContainersClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListStorageContainerBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStorageContainersClient().NewListAllPager(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.StorageContainersListResult = armazurestackhci.StorageContainersListResult{ // Value: []*armazurestackhci.StorageContainers{ // { // Name: to.Ptr("Default_Container"), // Type: to.Ptr("Microsoft.AzureStackHCI/storageContainers"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/Default_Container"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.StorageContainerProperties{ // Path: to.Ptr("C:\\container_storage"), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
func (*StorageContainersClient) NewListPager ¶
func (client *StorageContainersClient) NewListPager(resourceGroupName string, options *StorageContainersClientListOptions) *runtime.Pager[StorageContainersClientListResponse]
NewListPager - Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to get the next page of storage containers.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - StorageContainersClientListOptions contains the optional parameters for the StorageContainersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListStorageContainerByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStorageContainersClient().NewListPager("test-rg", 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.StorageContainersListResult = armazurestackhci.StorageContainersListResult{ // Value: []*armazurestackhci.StorageContainers{ // { // Name: to.Ptr("Default_Container"), // Type: to.Ptr("Microsoft.AzureStackHCI/storageContainers"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/Default_Container"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.StorageContainerProperties{ // Path: to.Ptr("C:\\container_storage"), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
type StorageContainersClientBeginCreateOrUpdateOptions ¶
type StorageContainersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageContainersClient.BeginCreateOrUpdate method.
type StorageContainersClientBeginDeleteOptions ¶
type StorageContainersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageContainersClientBeginDeleteOptions contains the optional parameters for the StorageContainersClient.BeginDelete method.
type StorageContainersClientBeginUpdateOptions ¶
type StorageContainersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageContainersClientBeginUpdateOptions contains the optional parameters for the StorageContainersClient.BeginUpdate method.
type StorageContainersClientCreateOrUpdateResponse ¶
type StorageContainersClientCreateOrUpdateResponse struct { // The storage container resource definition. StorageContainers }
StorageContainersClientCreateOrUpdateResponse contains the response from method StorageContainersClient.BeginCreateOrUpdate.
type StorageContainersClientDeleteResponse ¶
type StorageContainersClientDeleteResponse struct { }
StorageContainersClientDeleteResponse contains the response from method StorageContainersClient.BeginDelete.
type StorageContainersClientGetOptions ¶
type StorageContainersClientGetOptions struct { }
StorageContainersClientGetOptions contains the optional parameters for the StorageContainersClient.Get method.
type StorageContainersClientGetResponse ¶
type StorageContainersClientGetResponse struct { // The storage container resource definition. StorageContainers }
StorageContainersClientGetResponse contains the response from method StorageContainersClient.Get.
type StorageContainersClientListAllOptions ¶
type StorageContainersClientListAllOptions struct { }
StorageContainersClientListAllOptions contains the optional parameters for the StorageContainersClient.NewListAllPager method.
type StorageContainersClientListAllResponse ¶
type StorageContainersClientListAllResponse struct {
StorageContainersListResult
}
StorageContainersClientListAllResponse contains the response from method StorageContainersClient.NewListAllPager.
type StorageContainersClientListOptions ¶
type StorageContainersClientListOptions struct { }
StorageContainersClientListOptions contains the optional parameters for the StorageContainersClient.NewListPager method.
type StorageContainersClientListResponse ¶
type StorageContainersClientListResponse struct {
StorageContainersListResult
}
StorageContainersClientListResponse contains the response from method StorageContainersClient.NewListPager.
type StorageContainersClientUpdateResponse ¶
type StorageContainersClientUpdateResponse struct { // The storage container resource definition. StorageContainers }
StorageContainersClientUpdateResponse contains the response from method StorageContainersClient.BeginUpdate.
type StorageContainersListResult ¶
type StorageContainersListResult struct { NextLink *string Value []*StorageContainers }
func (StorageContainersListResult) MarshalJSON ¶
func (s StorageContainersListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageContainersListResult.
func (*StorageContainersListResult) UnmarshalJSON ¶
func (s *StorageContainersListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageContainersListResult.
type StorageContainersUpdateRequest ¶
StorageContainersUpdateRequest - The storage container resource patch definition.
func (StorageContainersUpdateRequest) MarshalJSON ¶
func (s StorageContainersUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageContainersUpdateRequest.
func (*StorageContainersUpdateRequest) UnmarshalJSON ¶
func (s *StorageContainersUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageContainersUpdateRequest.
type StorageProfileUpdate ¶
type StorageProfileUpdate struct { // adds data disks to the virtual machine instance for the update call DataDisks []*StorageProfileUpdateDataDisksItem }
func (StorageProfileUpdate) MarshalJSON ¶
func (s StorageProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfileUpdate.
func (*StorageProfileUpdate) UnmarshalJSON ¶
func (s *StorageProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileUpdate.
type StorageProfileUpdateDataDisksItem ¶
type StorageProfileUpdateDataDisksItem struct {
ID *string
}
func (StorageProfileUpdateDataDisksItem) MarshalJSON ¶
func (s StorageProfileUpdateDataDisksItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfileUpdateDataDisksItem.
func (*StorageProfileUpdateDataDisksItem) UnmarshalJSON ¶
func (s *StorageProfileUpdateDataDisksItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileUpdateDataDisksItem.
type Subnet ¶
type Subnet struct { // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string // Properties of the subnet. Properties *SubnetPropertiesFormat }
func (Subnet) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Subnet.
func (*Subnet) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Subnet.
type SubnetPropertiesFormat ¶
type SubnetPropertiesFormat struct { // The address prefix for the subnet: Cidr for this subnet - IPv4, IPv6. AddressPrefix *string // List of address prefixes for the subnet. AddressPrefixes []*string // IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic' IPAllocationMethod *IPAllocationMethodEnum // IPConfigurationReferences - list of IPConfigurationReferences IPConfigurationReferences []*SubnetPropertiesFormatIPConfigurationReferencesItem // network associated pool of IP Addresses IPPools []*IPPool // Route table resource. RouteTable *RouteTable // Vlan to use for the subnet Vlan *int32 }
SubnetPropertiesFormat - Properties of the subnet.
func (SubnetPropertiesFormat) MarshalJSON ¶
func (s SubnetPropertiesFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormat.
func (*SubnetPropertiesFormat) UnmarshalJSON ¶
func (s *SubnetPropertiesFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubnetPropertiesFormat.
type SubnetPropertiesFormatIPConfigurationReferencesItem ¶
type SubnetPropertiesFormatIPConfigurationReferencesItem struct { // IPConfigurationID ID *string }
SubnetPropertiesFormatIPConfigurationReferencesItem - IPConfigurationReference - Describes a IPConfiguration under the virtual network
func (SubnetPropertiesFormatIPConfigurationReferencesItem) MarshalJSON ¶
func (s SubnetPropertiesFormatIPConfigurationReferencesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormatIPConfigurationReferencesItem.
func (*SubnetPropertiesFormatIPConfigurationReferencesItem) UnmarshalJSON ¶
func (s *SubnetPropertiesFormatIPConfigurationReferencesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubnetPropertiesFormatIPConfigurationReferencesItem.
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 VMSizeEnum ¶
type VMSizeEnum string
const ( VMSizeEnumCustom VMSizeEnum = "Custom" VMSizeEnumDefault VMSizeEnum = "Default" VMSizeEnumStandardA2V2 VMSizeEnum = "Standard_A2_v2" VMSizeEnumStandardA4V2 VMSizeEnum = "Standard_A4_v2" VMSizeEnumStandardD16SV3 VMSizeEnum = "Standard_D16s_v3" VMSizeEnumStandardD2SV3 VMSizeEnum = "Standard_D2s_v3" VMSizeEnumStandardD32SV3 VMSizeEnum = "Standard_D32s_v3" VMSizeEnumStandardD4SV3 VMSizeEnum = "Standard_D4s_v3" VMSizeEnumStandardD8SV3 VMSizeEnum = "Standard_D8s_v3" VMSizeEnumStandardDS13V2 VMSizeEnum = "Standard_DS13_v2" VMSizeEnumStandardDS2V2 VMSizeEnum = "Standard_DS2_v2" VMSizeEnumStandardDS3V2 VMSizeEnum = "Standard_DS3_v2" VMSizeEnumStandardDS4V2 VMSizeEnum = "Standard_DS4_v2" VMSizeEnumStandardDS5V2 VMSizeEnum = "Standard_DS5_v2" VMSizeEnumStandardK8S2V1 VMSizeEnum = "Standard_K8S2_v1" VMSizeEnumStandardK8S3V1 VMSizeEnum = "Standard_K8S3_v1" VMSizeEnumStandardK8S4V1 VMSizeEnum = "Standard_K8S4_v1" VMSizeEnumStandardK8S5V1 VMSizeEnum = "Standard_K8S5_v1" VMSizeEnumStandardK8SV1 VMSizeEnum = "Standard_K8S_v1" VMSizeEnumStandardNK12 VMSizeEnum = "Standard_NK12" VMSizeEnumStandardNK6 VMSizeEnum = "Standard_NK6" VMSizeEnumStandardNV12 VMSizeEnum = "Standard_NV12" VMSizeEnumStandardNV6 VMSizeEnum = "Standard_NV6" )
func PossibleVMSizeEnumValues ¶
func PossibleVMSizeEnumValues() []VMSizeEnum
PossibleVMSizeEnumValues returns the possible values for the VMSizeEnum const type.
type VirtualHardDiskProperties ¶
type VirtualHardDiskProperties struct { BlockSizeBytes *int32 // Storage ContainerID of the storage container to be used for VHD ContainerID *string // The format of the actual VHD file [vhd, vhdx] DiskFileFormat *DiskFileFormat // Size of the disk in GB DiskSizeGB *int64 // Boolean for enabling dynamic sizing on the virtual hard disk Dynamic *bool // The hypervisor generation of the Virtual Machine [V1, V2] HyperVGeneration *HyperVGeneration LogicalSectorBytes *int32 PhysicalSectorBytes *int32 // READ-ONLY; Provisioning state of the virtual hard disk. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of virtual hard disks Status *VirtualHardDiskStatus }
VirtualHardDiskProperties - Properties under the virtual hard disk resource
func (VirtualHardDiskProperties) MarshalJSON ¶
func (v VirtualHardDiskProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualHardDiskProperties.
func (*VirtualHardDiskProperties) UnmarshalJSON ¶
func (v *VirtualHardDiskProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDiskProperties.
type VirtualHardDiskStatus ¶
type VirtualHardDiskStatus struct { // VirtualHardDisk provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string ProvisioningStatus *VirtualHardDiskStatusProvisioningStatus }
VirtualHardDiskStatus - The observed state of virtual hard disks
func (VirtualHardDiskStatus) MarshalJSON ¶
func (v VirtualHardDiskStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualHardDiskStatus.
func (*VirtualHardDiskStatus) UnmarshalJSON ¶
func (v *VirtualHardDiskStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDiskStatus.
type VirtualHardDiskStatusProvisioningStatus ¶
type VirtualHardDiskStatusProvisioningStatus struct { // The ID of the operation performed on the virtual hard disk OperationID *string // The status of the operation performed on the virtual hard disk [Succeeded, Failed, InProgress] Status *Status }
func (VirtualHardDiskStatusProvisioningStatus) MarshalJSON ¶
func (v VirtualHardDiskStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualHardDiskStatusProvisioningStatus.
func (*VirtualHardDiskStatusProvisioningStatus) UnmarshalJSON ¶
func (v *VirtualHardDiskStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDiskStatusProvisioningStatus.
type VirtualHardDisks ¶
type VirtualHardDisks struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Properties under the virtual hard disk resource Properties *VirtualHardDiskProperties // 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 }
VirtualHardDisks - The virtual hard disk resource definition.
func (VirtualHardDisks) MarshalJSON ¶
func (v VirtualHardDisks) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualHardDisks.
func (*VirtualHardDisks) UnmarshalJSON ¶
func (v *VirtualHardDisks) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDisks.
type VirtualHardDisksClient ¶
type VirtualHardDisksClient struct {
// contains filtered or unexported fields
}
VirtualHardDisksClient contains the methods for the VirtualHardDisks group. Don't use this type directly, use NewVirtualHardDisksClient() instead.
func NewVirtualHardDisksClient ¶
func NewVirtualHardDisksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHardDisksClient, error)
NewVirtualHardDisksClient creates a new instance of VirtualHardDisksClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualHardDisksClient) BeginCreateOrUpdate ¶
func (client *VirtualHardDisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHardDiskName string, virtualHardDisks VirtualHardDisks, options *VirtualHardDisksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHardDisksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualHardDiskName - Name of the virtual hard disk
- options - VirtualHardDisksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHardDisksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualHardDisk.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualHardDisksClient().BeginCreateOrUpdate(ctx, "test-rg", "test-vhd", armazurestackhci.VirtualHardDisks{ Location: to.Ptr("West US2"), ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.VirtualHardDiskProperties{ DiskSizeGB: to.Ptr[int64](32), }, }, 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.VirtualHardDisks = armazurestackhci.VirtualHardDisks{ // Name: to.Ptr("test-vhd"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualHardDisks"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualHardDiskProperties{ // BlockSizeBytes: to.Ptr[int32](0), // DiskFileFormat: to.Ptr(armazurestackhci.DiskFileFormatVhdx), // DiskSizeGB: to.Ptr[int64](32), // Dynamic: to.Ptr(true), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // LogicalSectorBytes: to.Ptr[int32](512), // PhysicalSectorBytes: to.Ptr[int32](512), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*VirtualHardDisksClient) BeginDelete ¶
func (client *VirtualHardDisksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHardDiskName string, options *VirtualHardDisksClientBeginDeleteOptions) (*runtime.Poller[VirtualHardDisksClientDeleteResponse], error)
BeginDelete - The operation to delete a virtual hard disk. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualHardDiskName - Name of the virtual hard disk
- options - VirtualHardDisksClientBeginDeleteOptions contains the optional parameters for the VirtualHardDisksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteVirtualHardDisk.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualHardDisksClient().BeginDelete(ctx, "test-rg", "test-vhd", 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 (*VirtualHardDisksClient) BeginUpdate ¶
func (client *VirtualHardDisksClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualHardDiskName string, virtualHardDisks VirtualHardDisksUpdateRequest, options *VirtualHardDisksClientBeginUpdateOptions) (*runtime.Poller[VirtualHardDisksClientUpdateResponse], error)
BeginUpdate - The operation to update a virtual hard disk. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualHardDiskName - Name of the virtual hard disk
- options - VirtualHardDisksClientBeginUpdateOptions contains the optional parameters for the VirtualHardDisksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateVirtualHardDisk.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualHardDisksClient().BeginUpdate(ctx, "test-rg", "test-vhd", armazurestackhci.VirtualHardDisksUpdateRequest{ Tags: map[string]*string{ "additionalProperties": to.Ptr("sample"), }, }, 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.VirtualHardDisks = armazurestackhci.VirtualHardDisks{ // Name: to.Ptr("test-vhd"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualHardDisks"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // Location: to.Ptr("West US2"), // Tags: map[string]*string{ // "additionalProperties": to.Ptr("sample"), // }, // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualHardDiskProperties{ // BlockSizeBytes: to.Ptr[int32](0), // DiskFileFormat: to.Ptr(armazurestackhci.DiskFileFormatVhdx), // DiskSizeGB: to.Ptr[int64](32), // Dynamic: to.Ptr(true), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // LogicalSectorBytes: to.Ptr[int32](512), // PhysicalSectorBytes: to.Ptr[int32](512), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*VirtualHardDisksClient) Get ¶
func (client *VirtualHardDisksClient) Get(ctx context.Context, resourceGroupName string, virtualHardDiskName string, options *VirtualHardDisksClientGetOptions) (VirtualHardDisksClientGetResponse, error)
Get - Gets a virtual hard disk If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualHardDiskName - Name of the virtual hard disk
- options - VirtualHardDisksClientGetOptions contains the optional parameters for the VirtualHardDisksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetVirtualHardDisk.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualHardDisksClient().Get(ctx, "test-rg", "test-vhd", 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.VirtualHardDisks = armazurestackhci.VirtualHardDisks{ // Name: to.Ptr("test-vhd"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualHardDisks"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualHardDiskProperties{ // BlockSizeBytes: to.Ptr[int32](0), // DiskFileFormat: to.Ptr(armazurestackhci.DiskFileFormatVhdx), // DiskSizeGB: to.Ptr[int64](32), // Dynamic: to.Ptr(true), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // LogicalSectorBytes: to.Ptr[int32](512), // PhysicalSectorBytes: to.Ptr[int32](512), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }
Output:
func (*VirtualHardDisksClient) NewListAllPager ¶
func (client *VirtualHardDisksClient) NewListAllPager(options *VirtualHardDisksClientListAllOptions) *runtime.Pager[VirtualHardDisksClientListAllResponse]
NewListAllPager - Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to get the next page of virtual hard disks.
Generated from API version 2023-09-01-preview
- options - VirtualHardDisksClientListAllOptions contains the optional parameters for the VirtualHardDisksClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualHardDiskBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualHardDisksClient().NewListAllPager(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.VirtualHardDisksListResult = armazurestackhci.VirtualHardDisksListResult{ // Value: []*armazurestackhci.VirtualHardDisks{ // { // Name: to.Ptr("test-vhd"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualHardDisks"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualHardDiskProperties{ // BlockSizeBytes: to.Ptr[int32](0), // DiskFileFormat: to.Ptr(armazurestackhci.DiskFileFormatVhdx), // DiskSizeGB: to.Ptr[int64](32), // Dynamic: to.Ptr(true), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // LogicalSectorBytes: to.Ptr[int32](512), // PhysicalSectorBytes: to.Ptr[int32](512), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
func (*VirtualHardDisksClient) NewListPager ¶
func (client *VirtualHardDisksClient) NewListPager(resourceGroupName string, options *VirtualHardDisksClientListOptions) *runtime.Pager[VirtualHardDisksClientListResponse]
NewListPager - Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to get the next page of virtual hard disks.
Generated from API version 2023-09-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - VirtualHardDisksClientListOptions contains the optional parameters for the VirtualHardDisksClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualHardDiskByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualHardDisksClient().NewListPager("test-rg", 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.VirtualHardDisksListResult = armazurestackhci.VirtualHardDisksListResult{ // Value: []*armazurestackhci.VirtualHardDisks{ // { // Name: to.Ptr("test-vhd"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualHardDisks"), // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // Location: to.Ptr("West US2"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualHardDiskProperties{ // BlockSizeBytes: to.Ptr[int32](0), // DiskFileFormat: to.Ptr(armazurestackhci.DiskFileFormatVhdx), // DiskSizeGB: to.Ptr[int64](32), // Dynamic: to.Ptr(true), // HyperVGeneration: to.Ptr(armazurestackhci.HyperVGenerationV2), // LogicalSectorBytes: to.Ptr[int32](512), // PhysicalSectorBytes: to.Ptr[int32](512), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // }, // }}, // } }
Output:
type VirtualHardDisksClientBeginCreateOrUpdateOptions ¶
type VirtualHardDisksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualHardDisksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHardDisksClient.BeginCreateOrUpdate method.
type VirtualHardDisksClientBeginDeleteOptions ¶
type VirtualHardDisksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualHardDisksClientBeginDeleteOptions contains the optional parameters for the VirtualHardDisksClient.BeginDelete method.
type VirtualHardDisksClientBeginUpdateOptions ¶
type VirtualHardDisksClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualHardDisksClientBeginUpdateOptions contains the optional parameters for the VirtualHardDisksClient.BeginUpdate method.
type VirtualHardDisksClientCreateOrUpdateResponse ¶
type VirtualHardDisksClientCreateOrUpdateResponse struct { // The virtual hard disk resource definition. VirtualHardDisks }
VirtualHardDisksClientCreateOrUpdateResponse contains the response from method VirtualHardDisksClient.BeginCreateOrUpdate.
type VirtualHardDisksClientDeleteResponse ¶
type VirtualHardDisksClientDeleteResponse struct { }
VirtualHardDisksClientDeleteResponse contains the response from method VirtualHardDisksClient.BeginDelete.
type VirtualHardDisksClientGetOptions ¶
type VirtualHardDisksClientGetOptions struct { }
VirtualHardDisksClientGetOptions contains the optional parameters for the VirtualHardDisksClient.Get method.
type VirtualHardDisksClientGetResponse ¶
type VirtualHardDisksClientGetResponse struct { // The virtual hard disk resource definition. VirtualHardDisks }
VirtualHardDisksClientGetResponse contains the response from method VirtualHardDisksClient.Get.
type VirtualHardDisksClientListAllOptions ¶
type VirtualHardDisksClientListAllOptions struct { }
VirtualHardDisksClientListAllOptions contains the optional parameters for the VirtualHardDisksClient.NewListAllPager method.
type VirtualHardDisksClientListAllResponse ¶
type VirtualHardDisksClientListAllResponse struct {
VirtualHardDisksListResult
}
VirtualHardDisksClientListAllResponse contains the response from method VirtualHardDisksClient.NewListAllPager.
type VirtualHardDisksClientListOptions ¶
type VirtualHardDisksClientListOptions struct { }
VirtualHardDisksClientListOptions contains the optional parameters for the VirtualHardDisksClient.NewListPager method.
type VirtualHardDisksClientListResponse ¶
type VirtualHardDisksClientListResponse struct {
VirtualHardDisksListResult
}
VirtualHardDisksClientListResponse contains the response from method VirtualHardDisksClient.NewListPager.
type VirtualHardDisksClientUpdateResponse ¶
type VirtualHardDisksClientUpdateResponse struct { // The virtual hard disk resource definition. VirtualHardDisks }
VirtualHardDisksClientUpdateResponse contains the response from method VirtualHardDisksClient.BeginUpdate.
type VirtualHardDisksListResult ¶
type VirtualHardDisksListResult struct { NextLink *string Value []*VirtualHardDisks }
func (VirtualHardDisksListResult) MarshalJSON ¶
func (v VirtualHardDisksListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualHardDisksListResult.
func (*VirtualHardDisksListResult) UnmarshalJSON ¶
func (v *VirtualHardDisksListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDisksListResult.
type VirtualHardDisksUpdateRequest ¶
VirtualHardDisksUpdateRequest - The virtual hard disk resource patch definition.
func (VirtualHardDisksUpdateRequest) MarshalJSON ¶
func (v VirtualHardDisksUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualHardDisksUpdateRequest.
func (*VirtualHardDisksUpdateRequest) UnmarshalJSON ¶
func (v *VirtualHardDisksUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDisksUpdateRequest.
type VirtualMachineConfigAgentInstanceView ¶
type VirtualMachineConfigAgentInstanceView struct { // The resource status information. Statuses []*InstanceViewStatus // The VM Config Agent full version. VMConfigAgentVersion *string }
VirtualMachineConfigAgentInstanceView - The instance view of the VM Config Agent running on the virtual machine.
func (VirtualMachineConfigAgentInstanceView) MarshalJSON ¶
func (v VirtualMachineConfigAgentInstanceView) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineConfigAgentInstanceView.
func (*VirtualMachineConfigAgentInstanceView) UnmarshalJSON ¶
func (v *VirtualMachineConfigAgentInstanceView) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineConfigAgentInstanceView.
type VirtualMachineInstance ¶
type VirtualMachineInstance struct { // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Identity for the resource. Identity *Identity // Properties under the virtual machine instance resource Properties *VirtualMachineInstanceProperties // 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 }
VirtualMachineInstance - The virtual machine instance resource definition.
func (VirtualMachineInstance) MarshalJSON ¶
func (v VirtualMachineInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstance.
func (*VirtualMachineInstance) UnmarshalJSON ¶
func (v *VirtualMachineInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstance.
type VirtualMachineInstanceListResult ¶
type VirtualMachineInstanceListResult struct { NextLink *string Value []*VirtualMachineInstance }
func (VirtualMachineInstanceListResult) MarshalJSON ¶
func (v VirtualMachineInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceListResult.
func (*VirtualMachineInstanceListResult) UnmarshalJSON ¶
func (v *VirtualMachineInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceListResult.
type VirtualMachineInstanceProperties ¶
type VirtualMachineInstanceProperties struct { // Guest agent install status. GuestAgentInstallStatus *GuestAgentInstallStatus // HTTP Proxy configuration for the VM. HTTPProxyConfig *HTTPProxyConfiguration // HardwareProfile - Specifies the hardware settings for the virtual machine instance. HardwareProfile *VirtualMachineInstancePropertiesHardwareProfile // NetworkProfile - describes the network configuration the virtual machine instance NetworkProfile *VirtualMachineInstancePropertiesNetworkProfile // OsProfile - describes the configuration of the operating system and sets login data OSProfile *VirtualMachineInstancePropertiesOsProfile // Unique identifier defined by ARC to identify the guest of the VM. ResourceUID *string // SecurityProfile - Specifies the security settings for the virtual machine instance. SecurityProfile *VirtualMachineInstancePropertiesSecurityProfile // StorageProfile - contains information about the disks and storage information for the virtual machine instance StorageProfile *VirtualMachineInstancePropertiesStorageProfile // READ-ONLY; The virtual machine instance view. InstanceView *VirtualMachineInstanceView // READ-ONLY; Provisioning state of the virtual machine instance. ProvisioningState *ProvisioningStateEnum // READ-ONLY; The observed state of virtual machine instances Status *VirtualMachineInstanceStatus // READ-ONLY; Unique identifier for the vm resource. VMID *string }
VirtualMachineInstanceProperties - Properties under the virtual machine instance resource
func (VirtualMachineInstanceProperties) MarshalJSON ¶
func (v VirtualMachineInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceProperties.
func (*VirtualMachineInstanceProperties) UnmarshalJSON ¶
func (v *VirtualMachineInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceProperties.
type VirtualMachineInstancePropertiesHardwareProfile ¶
type VirtualMachineInstancePropertiesHardwareProfile struct { DynamicMemoryConfig *VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig // RAM in MB for the virtual machine instance MemoryMB *int64 // number of processors for the virtual machine instance Processors *int32 VMSize *VMSizeEnum }
VirtualMachineInstancePropertiesHardwareProfile - HardwareProfile - Specifies the hardware settings for the virtual machine instance.
func (VirtualMachineInstancePropertiesHardwareProfile) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesHardwareProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesHardwareProfile.
func (*VirtualMachineInstancePropertiesHardwareProfile) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesHardwareProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesHardwareProfile.
type VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig ¶
type VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig struct { MaximumMemoryMB *int64 MinimumMemoryMB *int64 // Defines the amount of extra memory that should be reserved for a virtual machine instance at runtime, as a percentage of // the total memory that the virtual machine instance is thought to need. This // only applies to virtual systems with dynamic memory enabled. This property can be in the range of 5 to 2000. TargetMemoryBuffer *int32 }
func (VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.
func (*VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.
type VirtualMachineInstancePropertiesNetworkProfile ¶
type VirtualMachineInstancePropertiesNetworkProfile struct { // NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance NetworkInterfaces []*VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem }
VirtualMachineInstancePropertiesNetworkProfile - NetworkProfile - describes the network configuration the virtual machine instance
func (VirtualMachineInstancePropertiesNetworkProfile) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesNetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesNetworkProfile.
func (*VirtualMachineInstancePropertiesNetworkProfile) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesNetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesNetworkProfile.
type VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem ¶
type VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem struct { // ID - Resource Id of the network interface ID *string }
func (VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.
func (*VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.
type VirtualMachineInstancePropertiesOsProfile ¶
type VirtualMachineInstancePropertiesOsProfile struct { // AdminPassword - admin password AdminPassword *string // AdminUsername - admin username AdminUsername *string // ComputerName - name of the compute ComputerName *string // LinuxConfiguration - linux specific configuration values for the virtual machine instance LinuxConfiguration *VirtualMachineInstancePropertiesOsProfileLinuxConfiguration // Windows Configuration for the virtual machine instance WindowsConfiguration *VirtualMachineInstancePropertiesOsProfileWindowsConfiguration }
VirtualMachineInstancePropertiesOsProfile - OsProfile - describes the configuration of the operating system and sets login data
func (VirtualMachineInstancePropertiesOsProfile) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesOsProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesOsProfile.
func (*VirtualMachineInstancePropertiesOsProfile) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesOsProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesOsProfile.
type VirtualMachineInstancePropertiesOsProfileLinuxConfiguration ¶
type VirtualMachineInstancePropertiesOsProfileLinuxConfiguration struct { // DisablePasswordAuthentication - whether password authentication should be disabled DisablePasswordAuthentication *bool // Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation // process. ProvisionVMAgent *bool // Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ProvisionVMConfigAgent *bool // Specifies the ssh key configuration for a Linux OS. SSH *SSHConfiguration }
VirtualMachineInstancePropertiesOsProfileLinuxConfiguration - LinuxConfiguration - linux specific configuration values for the virtual machine instance
func (VirtualMachineInstancePropertiesOsProfileLinuxConfiguration) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesOsProfileLinuxConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.
func (*VirtualMachineInstancePropertiesOsProfileLinuxConfiguration) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesOsProfileLinuxConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.
type VirtualMachineInstancePropertiesOsProfileWindowsConfiguration ¶
type VirtualMachineInstancePropertiesOsProfileWindowsConfiguration struct { // Whether to EnableAutomaticUpdates on the machine EnableAutomaticUpdates *bool // Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation // process. ProvisionVMAgent *bool // Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ProvisionVMConfigAgent *bool // Specifies the ssh key configuration for Windows OS. SSH *SSHConfiguration // TimeZone for the virtual machine instance TimeZone *string }
VirtualMachineInstancePropertiesOsProfileWindowsConfiguration - Windows Configuration for the virtual machine instance
func (VirtualMachineInstancePropertiesOsProfileWindowsConfiguration) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesOsProfileWindowsConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.
func (*VirtualMachineInstancePropertiesOsProfileWindowsConfiguration) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesOsProfileWindowsConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.
type VirtualMachineInstancePropertiesSecurityProfile ¶
type VirtualMachineInstancePropertiesSecurityProfile struct { EnableTPM *bool // Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType // to function. SecurityType *SecurityTypes UefiSettings *VirtualMachineInstancePropertiesSecurityProfileUefiSettings }
VirtualMachineInstancePropertiesSecurityProfile - SecurityProfile - Specifies the security settings for the virtual machine instance.
func (VirtualMachineInstancePropertiesSecurityProfile) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesSecurityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesSecurityProfile.
func (*VirtualMachineInstancePropertiesSecurityProfile) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesSecurityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesSecurityProfile.
type VirtualMachineInstancePropertiesSecurityProfileUefiSettings ¶
type VirtualMachineInstancePropertiesSecurityProfileUefiSettings struct { // Specifies whether secure boot should be enabled on the virtual machine instance. SecureBootEnabled *bool }
func (VirtualMachineInstancePropertiesSecurityProfileUefiSettings) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesSecurityProfileUefiSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesSecurityProfileUefiSettings.
func (*VirtualMachineInstancePropertiesSecurityProfileUefiSettings) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesSecurityProfileUefiSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesSecurityProfileUefiSettings.
type VirtualMachineInstancePropertiesStorageProfile ¶
type VirtualMachineInstancePropertiesStorageProfile struct { // adds data disks to the virtual machine instance DataDisks []*VirtualMachineInstancePropertiesStorageProfileDataDisksItem // Which Image to use for the virtual machine instance ImageReference *VirtualMachineInstancePropertiesStorageProfileImageReference // VHD to attach as OS disk OSDisk *VirtualMachineInstancePropertiesStorageProfileOsDisk // Id of the storage container that hosts the VM configuration file VMConfigStoragePathID *string }
VirtualMachineInstancePropertiesStorageProfile - StorageProfile - contains information about the disks and storage information for the virtual machine instance
func (VirtualMachineInstancePropertiesStorageProfile) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesStorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesStorageProfile.
func (*VirtualMachineInstancePropertiesStorageProfile) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesStorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesStorageProfile.
type VirtualMachineInstancePropertiesStorageProfileDataDisksItem ¶
type VirtualMachineInstancePropertiesStorageProfileDataDisksItem struct { // Resource ID of the data disk ID *string }
func (VirtualMachineInstancePropertiesStorageProfileDataDisksItem) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesStorageProfileDataDisksItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesStorageProfileDataDisksItem.
func (*VirtualMachineInstancePropertiesStorageProfileDataDisksItem) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesStorageProfileDataDisksItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesStorageProfileDataDisksItem.
type VirtualMachineInstancePropertiesStorageProfileImageReference ¶
type VirtualMachineInstancePropertiesStorageProfileImageReference struct { // Resource ID of the image ID *string }
VirtualMachineInstancePropertiesStorageProfileImageReference - Which Image to use for the virtual machine instance
func (VirtualMachineInstancePropertiesStorageProfileImageReference) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesStorageProfileImageReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesStorageProfileImageReference.
func (*VirtualMachineInstancePropertiesStorageProfileImageReference) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesStorageProfileImageReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesStorageProfileImageReference.
type VirtualMachineInstancePropertiesStorageProfileOsDisk ¶
type VirtualMachineInstancePropertiesStorageProfileOsDisk struct { // Resource ID of the OS disk ID *string // This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or // a specialized VHD. Possible values are: Windows, Linux. OSType *OperatingSystemTypes }
VirtualMachineInstancePropertiesStorageProfileOsDisk - VHD to attach as OS disk
func (VirtualMachineInstancePropertiesStorageProfileOsDisk) MarshalJSON ¶
func (v VirtualMachineInstancePropertiesStorageProfileOsDisk) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancePropertiesStorageProfileOsDisk.
func (*VirtualMachineInstancePropertiesStorageProfileOsDisk) UnmarshalJSON ¶
func (v *VirtualMachineInstancePropertiesStorageProfileOsDisk) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancePropertiesStorageProfileOsDisk.
type VirtualMachineInstanceStatus ¶
type VirtualMachineInstanceStatus struct { // VirtualMachine provisioning error code ErrorCode *string // Descriptive error message ErrorMessage *string // The power state of the virtual machine instance PowerState *PowerStateEnum ProvisioningStatus *VirtualMachineInstanceStatusProvisioningStatus }
VirtualMachineInstanceStatus - The observed state of virtual machine instances
func (VirtualMachineInstanceStatus) MarshalJSON ¶
func (v VirtualMachineInstanceStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceStatus.
func (*VirtualMachineInstanceStatus) UnmarshalJSON ¶
func (v *VirtualMachineInstanceStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceStatus.
type VirtualMachineInstanceStatusProvisioningStatus ¶
type VirtualMachineInstanceStatusProvisioningStatus struct { // The ID of the operation performed on the virtual machine instance OperationID *string // The status of the operation performed on the virtual machine instance [Succeeded, Failed, InProgress] Status *Status }
func (VirtualMachineInstanceStatusProvisioningStatus) MarshalJSON ¶
func (v VirtualMachineInstanceStatusProvisioningStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceStatusProvisioningStatus.
func (*VirtualMachineInstanceStatusProvisioningStatus) UnmarshalJSON ¶
func (v *VirtualMachineInstanceStatusProvisioningStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceStatusProvisioningStatus.
type VirtualMachineInstanceUpdateProperties ¶
type VirtualMachineInstanceUpdateProperties struct { // HardwareProfile - Specifies the hardware settings for the virtual machine instance. HardwareProfile *HardwareProfileUpdate // NetworkProfile - describes the network update configuration the virtual machine instance NetworkProfile *NetworkProfileUpdate // OsProfile - describes the update configuration of the operating system OSProfile *OsProfileUpdate StorageProfile *StorageProfileUpdate }
VirtualMachineInstanceUpdateProperties - Defines the resource properties for the update.
func (VirtualMachineInstanceUpdateProperties) MarshalJSON ¶
func (v VirtualMachineInstanceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceUpdateProperties.
func (*VirtualMachineInstanceUpdateProperties) UnmarshalJSON ¶
func (v *VirtualMachineInstanceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceUpdateProperties.
type VirtualMachineInstanceUpdateRequest ¶
type VirtualMachineInstanceUpdateRequest struct { // Identity for the resource. Identity *Identity // Defines the resource properties for the update. Properties *VirtualMachineInstanceUpdateProperties }
VirtualMachineInstanceUpdateRequest - The virtual machine instance resource patch definition.
func (VirtualMachineInstanceUpdateRequest) MarshalJSON ¶
func (v VirtualMachineInstanceUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceUpdateRequest.
func (*VirtualMachineInstanceUpdateRequest) UnmarshalJSON ¶
func (v *VirtualMachineInstanceUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceUpdateRequest.
type VirtualMachineInstanceView ¶
type VirtualMachineInstanceView struct { // The VM Config Agent running on the virtual machine. VMAgent *VirtualMachineConfigAgentInstanceView }
VirtualMachineInstanceView - The instance view of a virtual machine.
func (VirtualMachineInstanceView) MarshalJSON ¶
func (v VirtualMachineInstanceView) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceView.
func (*VirtualMachineInstanceView) UnmarshalJSON ¶
func (v *VirtualMachineInstanceView) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceView.
type VirtualMachineInstancesClient ¶
type VirtualMachineInstancesClient struct {
// contains filtered or unexported fields
}
VirtualMachineInstancesClient contains the methods for the VirtualMachineInstances group. Don't use this type directly, use NewVirtualMachineInstancesClient() instead.
func NewVirtualMachineInstancesClient ¶
func NewVirtualMachineInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineInstancesClient, error)
NewVirtualMachineInstancesClient creates a new instance of VirtualMachineInstancesClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachineInstancesClient) BeginCreateOrUpdate ¶
func (client *VirtualMachineInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceURI string, virtualMachineInstance VirtualMachineInstance, options *VirtualMachineInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineInstancesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginCreateOrUpdate method.
Example (PutVirtualMachineInstanceWithGalleryImage) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", armazurestackhci.VirtualMachineInstance{ ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.VirtualMachineInstanceProperties{ HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), }, NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ { ID: to.Ptr("test-nic"), }}, }, OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ AdminPassword: to.Ptr("password"), AdminUsername: to.Ptr("localadmin"), ComputerName: to.Ptr("luamaster"), }, SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ EnableTPM: to.Ptr(true), UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ SecureBootEnabled: to.Ptr(true), }, }, StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), }, VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), }, }, }, 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
Example (PutVirtualMachineInstanceWithMarketplaceGalleryImage) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithMarketplaceGalleryImage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", armazurestackhci.VirtualMachineInstance{ ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.VirtualMachineInstanceProperties{ HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), }, NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ { ID: to.Ptr("test-nic"), }}, }, OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ AdminPassword: to.Ptr("password"), AdminUsername: to.Ptr("localadmin"), ComputerName: to.Ptr("luamaster"), }, SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ EnableTPM: to.Ptr(true), UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ SecureBootEnabled: to.Ptr(true), }, }, StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), }, VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), }, }, }, 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
Example (PutVirtualMachineInstanceWithOsDisk) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithOsDisk.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", armazurestackhci.VirtualMachineInstance{ ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.VirtualMachineInstanceProperties{ HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), }, NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ { ID: to.Ptr("test-nic"), }}, }, SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ EnableTPM: to.Ptr(true), UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ SecureBootEnabled: to.Ptr(true), }, }, StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ OSDisk: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileOsDisk{ ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), }, VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), }, }, }, 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // OSDisk: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileOsDisk{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
Example (PutVirtualMachineInstanceWithVmConfigAgent) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithVMConfigAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", armazurestackhci.VirtualMachineInstance{ ExtendedLocation: &armazurestackhci.ExtendedLocation{ Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), }, Properties: &armazurestackhci.VirtualMachineInstanceProperties{ HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), }, NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ { ID: to.Ptr("test-nic"), }}, }, OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ AdminPassword: to.Ptr("password"), AdminUsername: to.Ptr("localadmin"), ComputerName: to.Ptr("luamaster"), WindowsConfiguration: &armazurestackhci.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration{ ProvisionVMConfigAgent: to.Ptr(true), }, }, SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ EnableTPM: to.Ptr(true), UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ SecureBootEnabled: to.Ptr(true), }, }, StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), }, VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), }, }, }, 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // InstanceView: &armazurestackhci.VirtualMachineInstanceView{ // VMAgent: &armazurestackhci.VirtualMachineConfigAgentInstanceView{ // Statuses: []*armazurestackhci.InstanceViewStatus{ // { // Code: to.Ptr("Ok"), // DisplayStatus: to.Ptr("Ok"), // Level: to.Ptr(armazurestackhci.StatusLevelTypesInfo), // Message: to.Ptr("The agent is healthy"), // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2009-06-15T05:45:30.000Z"); return t}()), // }}, // VMConfigAgentVersion: to.Ptr("1.0.0"), // }, // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
func (*VirtualMachineInstancesClient) BeginDelete ¶
func (client *VirtualMachineInstancesClient) BeginDelete(ctx context.Context, resourceURI string, options *VirtualMachineInstancesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineInstancesClientDeleteResponse], error)
BeginDelete - The operation to delete a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteVirtualMachineInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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 (*VirtualMachineInstancesClient) BeginRestart ¶
func (client *VirtualMachineInstancesClient) BeginRestart(ctx context.Context, resourceURI string, options *VirtualMachineInstancesClientBeginRestartOptions) (*runtime.Poller[VirtualMachineInstancesClientRestartResponse], error)
BeginRestart - The operation to restart a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientBeginRestartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginRestart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/RestartVirtualMachineInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginRestart(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
func (*VirtualMachineInstancesClient) BeginStart ¶
func (client *VirtualMachineInstancesClient) BeginStart(ctx context.Context, resourceURI string, options *VirtualMachineInstancesClientBeginStartOptions) (*runtime.Poller[VirtualMachineInstancesClientStartResponse], error)
BeginStart - The operation to start a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientBeginStartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/StartVirtualMachineInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginStart(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
func (*VirtualMachineInstancesClient) BeginStop ¶
func (client *VirtualMachineInstancesClient) BeginStop(ctx context.Context, resourceURI string, options *VirtualMachineInstancesClientBeginStopOptions) (*runtime.Poller[VirtualMachineInstancesClientStopResponse], error)
BeginStop - The operation to stop a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientBeginStopOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/StopVirtualMachineInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginStop(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // SecurityProfile: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfile{ // EnableTPM: to.Ptr(true), // UefiSettings: &armazurestackhci.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{ // SecureBootEnabled: to.Ptr(true), // }, // }, // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
func (*VirtualMachineInstancesClient) BeginUpdate ¶
func (client *VirtualMachineInstancesClient) BeginUpdate(ctx context.Context, resourceURI string, virtualMachineInstance VirtualMachineInstanceUpdateRequest, options *VirtualMachineInstancesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineInstancesClientUpdateResponse], error)
BeginUpdate - The operation to update a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateVirtualMachineInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", armazurestackhci.VirtualMachineInstanceUpdateRequest{ Properties: &armazurestackhci.VirtualMachineInstanceUpdateProperties{ StorageProfile: &armazurestackhci.StorageProfileUpdate{ DataDisks: []*armazurestackhci.StorageProfileUpdateDataDisksItem{ { ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), }}, }, }, }, 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // DataDisks: []*armazurestackhci.VirtualMachineInstancePropertiesStorageProfileDataDisksItem{ // { // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"), // }}, // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // }, // }, // }
Output:
func (*VirtualMachineInstancesClient) Get ¶
func (client *VirtualMachineInstancesClient) Get(ctx context.Context, resourceURI string, options *VirtualMachineInstancesClientGetOptions) (VirtualMachineInstancesClientGetResponse, error)
Get - Gets a virtual machine instance If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientGetOptions contains the optional parameters for the VirtualMachineInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetVirtualMachineInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachineInstancesClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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.VirtualMachineInstance = armazurestackhci.VirtualMachineInstance{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }
Output:
func (*VirtualMachineInstancesClient) NewListPager ¶
func (client *VirtualMachineInstancesClient) NewListPager(resourceURI string, options *VirtualMachineInstancesClientListOptions) *runtime.Pager[VirtualMachineInstancesClientListResponse]
NewListPager - Lists all of the virtual machine instances within the specified parent resource.
Generated from API version 2023-09-01-preview
- resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
- options - VirtualMachineInstancesClientListOptions contains the optional parameters for the VirtualMachineInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualMachineInstances.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachineInstancesClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", 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.VirtualMachineInstanceListResult = armazurestackhci.VirtualMachineInstanceListResult{ // Value: []*armazurestackhci.VirtualMachineInstance{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"), // ExtendedLocation: &armazurestackhci.ExtendedLocation{ // Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"), // Type: to.Ptr(armazurestackhci.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurestackhci.VirtualMachineInstanceProperties{ // HardwareProfile: &armazurestackhci.VirtualMachineInstancePropertiesHardwareProfile{ // VMSize: to.Ptr(armazurestackhci.VMSizeEnumDefault), // }, // NetworkProfile: &armazurestackhci.VirtualMachineInstancePropertiesNetworkProfile{ // NetworkInterfaces: []*armazurestackhci.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem{ // { // ID: to.Ptr("test-nic"), // }}, // }, // OSProfile: &armazurestackhci.VirtualMachineInstancePropertiesOsProfile{ // AdminUsername: to.Ptr("localadmin"), // ComputerName: to.Ptr("luamaster"), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateEnumSucceeded), // StorageProfile: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfile{ // ImageReference: &armazurestackhci.VirtualMachineInstancePropertiesStorageProfileImageReference{ // ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"), // }, // VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"), // }, // }, // }}, // } }
Output:
type VirtualMachineInstancesClientBeginCreateOrUpdateOptions ¶
type VirtualMachineInstancesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginCreateOrUpdate method.
type VirtualMachineInstancesClientBeginDeleteOptions ¶
type VirtualMachineInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineInstancesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginDelete method.
type VirtualMachineInstancesClientBeginRestartOptions ¶
type VirtualMachineInstancesClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineInstancesClientBeginRestartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginRestart method.
type VirtualMachineInstancesClientBeginStartOptions ¶
type VirtualMachineInstancesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineInstancesClientBeginStartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStart method.
type VirtualMachineInstancesClientBeginStopOptions ¶
type VirtualMachineInstancesClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineInstancesClientBeginStopOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStop method.
type VirtualMachineInstancesClientBeginUpdateOptions ¶
type VirtualMachineInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineInstancesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginUpdate method.
type VirtualMachineInstancesClientCreateOrUpdateResponse ¶
type VirtualMachineInstancesClientCreateOrUpdateResponse struct { // The virtual machine instance resource definition. VirtualMachineInstance }
VirtualMachineInstancesClientCreateOrUpdateResponse contains the response from method VirtualMachineInstancesClient.BeginCreateOrUpdate.
type VirtualMachineInstancesClientDeleteResponse ¶
type VirtualMachineInstancesClientDeleteResponse struct { }
VirtualMachineInstancesClientDeleteResponse contains the response from method VirtualMachineInstancesClient.BeginDelete.
type VirtualMachineInstancesClientGetOptions ¶
type VirtualMachineInstancesClientGetOptions struct { }
VirtualMachineInstancesClientGetOptions contains the optional parameters for the VirtualMachineInstancesClient.Get method.
type VirtualMachineInstancesClientGetResponse ¶
type VirtualMachineInstancesClientGetResponse struct { // The virtual machine instance resource definition. VirtualMachineInstance }
VirtualMachineInstancesClientGetResponse contains the response from method VirtualMachineInstancesClient.Get.
type VirtualMachineInstancesClientListOptions ¶
type VirtualMachineInstancesClientListOptions struct { }
VirtualMachineInstancesClientListOptions contains the optional parameters for the VirtualMachineInstancesClient.NewListPager method.
type VirtualMachineInstancesClientListResponse ¶
type VirtualMachineInstancesClientListResponse struct {
VirtualMachineInstanceListResult
}
VirtualMachineInstancesClientListResponse contains the response from method VirtualMachineInstancesClient.NewListPager.
type VirtualMachineInstancesClientRestartResponse ¶
type VirtualMachineInstancesClientRestartResponse struct { // The virtual machine instance resource definition. VirtualMachineInstance }
VirtualMachineInstancesClientRestartResponse contains the response from method VirtualMachineInstancesClient.BeginRestart.
type VirtualMachineInstancesClientStartResponse ¶
type VirtualMachineInstancesClientStartResponse struct { // The virtual machine instance resource definition. VirtualMachineInstance }
VirtualMachineInstancesClientStartResponse contains the response from method VirtualMachineInstancesClient.BeginStart.
type VirtualMachineInstancesClientStopResponse ¶
type VirtualMachineInstancesClientStopResponse struct { // The virtual machine instance resource definition. VirtualMachineInstance }
VirtualMachineInstancesClientStopResponse contains the response from method VirtualMachineInstancesClient.BeginStop.
type VirtualMachineInstancesClientUpdateResponse ¶
type VirtualMachineInstancesClientUpdateResponse struct { // The virtual machine instance resource definition. VirtualMachineInstance }
VirtualMachineInstancesClientUpdateResponse contains the response from method VirtualMachineInstancesClient.BeginUpdate.
Source Files ¶
- build.go
- client_factory.go
- constants.go
- galleryimages_client.go
- guestagent_client.go
- guestagents_client.go
- hybrididentitymetadata_client.go
- logicalnetworks_client.go
- marketplacegalleryimages_client.go
- models.go
- models_serde.go
- networkinterfaces_client.go
- operations_client.go
- options.go
- response_types.go
- storagecontainers_client.go
- time_rfc3339.go
- virtualharddisks_client.go
- virtualmachineinstances_client.go