Documentation ¶
Index ¶
- type AvailablePatchCountByClassification
- type Cluster
- type ClusterInventoryItem
- type ClusterProperties
- type ClustersClient
- func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientCreateResponse], error)
- func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientDeleteResponse], error)
- func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientGetResponse, error)
- func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
- func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]
- func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientUpdateResponse, error)
- type ClustersClientBeginCreateOptions
- type ClustersClientBeginDeleteOptions
- type ClustersClientCreateResponse
- type ClustersClientDeleteResponse
- type ClustersClientGetOptions
- type ClustersClientGetResponse
- type ClustersClientListByResourceGroupOptions
- type ClustersClientListByResourceGroupResponse
- type ClustersClientListOptions
- type ClustersClientListResponse
- type ClustersClientUpdateOptions
- type ClustersClientUpdateResponse
- type ClustersList
- type Condition
- type CreatedByType
- type Datastore
- type DatastoreInventoryItem
- type DatastoreProperties
- type DatastoresClient
- func (client *DatastoresClient) BeginCreate(ctx context.Context, resourceGroupName string, datastoreName string, ...) (*runtime.Poller[DatastoresClientCreateResponse], error)
- func (client *DatastoresClient) BeginDelete(ctx context.Context, resourceGroupName string, datastoreName string, ...) (*runtime.Poller[DatastoresClientDeleteResponse], error)
- func (client *DatastoresClient) Get(ctx context.Context, resourceGroupName string, datastoreName string, ...) (DatastoresClientGetResponse, error)
- func (client *DatastoresClient) NewListByResourceGroupPager(resourceGroupName string, options *DatastoresClientListByResourceGroupOptions) *runtime.Pager[DatastoresClientListByResourceGroupResponse]
- func (client *DatastoresClient) NewListPager(options *DatastoresClientListOptions) *runtime.Pager[DatastoresClientListResponse]
- func (client *DatastoresClient) Update(ctx context.Context, resourceGroupName string, datastoreName string, ...) (DatastoresClientUpdateResponse, error)
- type DatastoresClientBeginCreateOptions
- type DatastoresClientBeginDeleteOptions
- type DatastoresClientCreateResponse
- type DatastoresClientDeleteResponse
- type DatastoresClientGetOptions
- type DatastoresClientGetResponse
- type DatastoresClientListByResourceGroupOptions
- type DatastoresClientListByResourceGroupResponse
- type DatastoresClientListOptions
- type DatastoresClientListResponse
- type DatastoresClientUpdateOptions
- type DatastoresClientUpdateResponse
- type DatastoresList
- type DiskMode
- type DiskType
- type ErrorDefinition
- type ErrorDetail
- type ErrorResponse
- type ExtendedLocation
- type FirmwareType
- type GuestAgent
- type GuestAgentList
- type GuestAgentProfile
- type GuestAgentProperties
- type GuestAgentsClient
- func (client *GuestAgentsClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[GuestAgentsClientCreateResponse], error)
- func (client *GuestAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[GuestAgentsClientDeleteResponse], error)
- func (client *GuestAgentsClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (GuestAgentsClientGetResponse, error)
- func (client *GuestAgentsClient) NewListByVMPager(resourceGroupName string, virtualMachineName string, ...) *runtime.Pager[GuestAgentsClientListByVMResponse]
- type GuestAgentsClientBeginCreateOptions
- type GuestAgentsClientBeginDeleteOptions
- type GuestAgentsClientCreateResponse
- type GuestAgentsClientDeleteResponse
- type GuestAgentsClientGetOptions
- type GuestAgentsClientGetResponse
- type GuestAgentsClientListByVMOptions
- type GuestAgentsClientListByVMResponse
- type GuestCredential
- type HTTPProxyConfiguration
- type HardwareProfile
- type Host
- type HostInventoryItem
- type HostProperties
- type HostsClient
- func (client *HostsClient) BeginCreate(ctx context.Context, resourceGroupName string, hostName string, body Host, ...) (*runtime.Poller[HostsClientCreateResponse], error)
- func (client *HostsClient) BeginDelete(ctx context.Context, resourceGroupName string, hostName string, ...) (*runtime.Poller[HostsClientDeleteResponse], error)
- func (client *HostsClient) Get(ctx context.Context, resourceGroupName string, hostName string, ...) (HostsClientGetResponse, error)
- func (client *HostsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostsClientListByResourceGroupOptions) *runtime.Pager[HostsClientListByResourceGroupResponse]
- func (client *HostsClient) NewListPager(options *HostsClientListOptions) *runtime.Pager[HostsClientListResponse]
- func (client *HostsClient) Update(ctx context.Context, resourceGroupName string, hostName string, ...) (HostsClientUpdateResponse, error)
- type HostsClientBeginCreateOptions
- type HostsClientBeginDeleteOptions
- type HostsClientCreateResponse
- type HostsClientDeleteResponse
- type HostsClientGetOptions
- type HostsClientGetResponse
- type HostsClientListByResourceGroupOptions
- type HostsClientListByResourceGroupResponse
- type HostsClientListOptions
- type HostsClientListResponse
- type HostsClientUpdateOptions
- type HostsClientUpdateResponse
- type HostsList
- type HybridIdentityMetadata
- type HybridIdentityMetadataClient
- func (client *HybridIdentityMetadataClient) Create(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (HybridIdentityMetadataClientCreateResponse, error)
- func (client *HybridIdentityMetadataClient) Delete(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (HybridIdentityMetadataClientDeleteResponse, error)
- func (client *HybridIdentityMetadataClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (HybridIdentityMetadataClientGetResponse, error)
- func (client *HybridIdentityMetadataClient) NewListByVMPager(resourceGroupName string, virtualMachineName string, ...) *runtime.Pager[HybridIdentityMetadataClientListByVMResponse]
- type HybridIdentityMetadataClientCreateOptions
- type HybridIdentityMetadataClientCreateResponse
- type HybridIdentityMetadataClientDeleteOptions
- type HybridIdentityMetadataClientDeleteResponse
- type HybridIdentityMetadataClientGetOptions
- type HybridIdentityMetadataClientGetResponse
- type HybridIdentityMetadataClientListByVMOptions
- type HybridIdentityMetadataClientListByVMResponse
- type HybridIdentityMetadataList
- type HybridIdentityMetadataProperties
- type IPAddressAllocationMethod
- type Identity
- type IdentityType
- type InventoryItem
- type InventoryItemDetails
- type InventoryItemProperties
- type InventoryItemPropertiesClassification
- type InventoryItemsClient
- func (client *InventoryItemsClient) Create(ctx context.Context, resourceGroupName string, vcenterName string, ...) (InventoryItemsClientCreateResponse, error)
- func (client *InventoryItemsClient) Delete(ctx context.Context, resourceGroupName string, vcenterName string, ...) (InventoryItemsClientDeleteResponse, error)
- func (client *InventoryItemsClient) Get(ctx context.Context, resourceGroupName string, vcenterName string, ...) (InventoryItemsClientGetResponse, error)
- func (client *InventoryItemsClient) NewListByVCenterPager(resourceGroupName string, vcenterName string, ...) *runtime.Pager[InventoryItemsClientListByVCenterResponse]
- type InventoryItemsClientCreateOptions
- type InventoryItemsClientCreateResponse
- type InventoryItemsClientDeleteOptions
- type InventoryItemsClientDeleteResponse
- type InventoryItemsClientGetOptions
- type InventoryItemsClientGetResponse
- type InventoryItemsClientListByVCenterOptions
- type InventoryItemsClientListByVCenterResponse
- type InventoryItemsList
- type InventoryType
- type LinuxParameters
- type MachineExtension
- type MachineExtensionInstanceView
- type MachineExtensionInstanceViewStatus
- type MachineExtensionProperties
- type MachineExtensionPropertiesInstanceView
- type MachineExtensionUpdate
- type MachineExtensionUpdateProperties
- type MachineExtensionsClient
- func (client *MachineExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[MachineExtensionsClientCreateOrUpdateResponse], error)
- func (client *MachineExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[MachineExtensionsClientDeleteResponse], error)
- func (client *MachineExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[MachineExtensionsClientUpdateResponse], error)
- func (client *MachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, name string, ...) (MachineExtensionsClientGetResponse, error)
- func (client *MachineExtensionsClient) NewListPager(resourceGroupName string, name string, ...) *runtime.Pager[MachineExtensionsClientListResponse]
- type MachineExtensionsClientBeginCreateOrUpdateOptions
- type MachineExtensionsClientBeginDeleteOptions
- type MachineExtensionsClientBeginUpdateOptions
- type MachineExtensionsClientCreateOrUpdateResponse
- type MachineExtensionsClientDeleteResponse
- type MachineExtensionsClientGetOptions
- type MachineExtensionsClientGetResponse
- type MachineExtensionsClientListOptions
- type MachineExtensionsClientListResponse
- type MachineExtensionsClientUpdateResponse
- type MachineExtensionsListResult
- type NICType
- type NetworkInterface
- type NetworkInterfaceUpdate
- type NetworkProfile
- type NetworkProfileUpdate
- type NicIPAddressSettings
- type NicIPSettings
- type Operation
- type OperationDisplay
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OperationsList
- type OsProfile
- type OsProfileLinuxConfiguration
- type OsProfileUpdate
- type OsProfileUpdateLinuxConfiguration
- type OsProfileUpdateWindowsConfiguration
- type OsProfileWindowsConfiguration
- type OsType
- type OsTypeUM
- type PatchOperationStartedBy
- type PatchOperationStatus
- type PatchServiceUsed
- type PatchSettings
- type PlacementProfile
- type PowerOnBootOption
- type ProvisioningAction
- type ProvisioningState
- type ProxyResource
- type Resource
- type ResourcePatch
- type ResourcePool
- type ResourcePoolInventoryItem
- type ResourcePoolProperties
- type ResourcePoolsClient
- func (client *ResourcePoolsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourcePoolName string, ...) (*runtime.Poller[ResourcePoolsClientCreateResponse], error)
- func (client *ResourcePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourcePoolName string, ...) (*runtime.Poller[ResourcePoolsClientDeleteResponse], error)
- func (client *ResourcePoolsClient) Get(ctx context.Context, resourceGroupName string, resourcePoolName string, ...) (ResourcePoolsClientGetResponse, error)
- func (client *ResourcePoolsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ResourcePoolsClientListByResourceGroupResponse]
- func (client *ResourcePoolsClient) NewListPager(options *ResourcePoolsClientListOptions) *runtime.Pager[ResourcePoolsClientListResponse]
- func (client *ResourcePoolsClient) Update(ctx context.Context, resourceGroupName string, resourcePoolName string, ...) (ResourcePoolsClientUpdateResponse, error)
- type ResourcePoolsClientBeginCreateOptions
- type ResourcePoolsClientBeginDeleteOptions
- type ResourcePoolsClientCreateResponse
- type ResourcePoolsClientDeleteResponse
- type ResourcePoolsClientGetOptions
- type ResourcePoolsClientGetResponse
- type ResourcePoolsClientListByResourceGroupOptions
- type ResourcePoolsClientListByResourceGroupResponse
- type ResourcePoolsClientListOptions
- type ResourcePoolsClientListResponse
- type ResourcePoolsClientUpdateOptions
- type ResourcePoolsClientUpdateResponse
- type ResourcePoolsList
- type ResourceStatus
- type SCSIControllerType
- type SecurityProfile
- type StatusLevelTypes
- type StatusTypes
- type StopVirtualMachineOptions
- type StorageProfile
- type StorageProfileUpdate
- type SystemData
- type UefiSettings
- type VCenter
- type VCenterProperties
- type VCentersClient
- func (client *VCentersClient) BeginCreate(ctx context.Context, resourceGroupName string, vcenterName string, ...) (*runtime.Poller[VCentersClientCreateResponse], error)
- func (client *VCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, vcenterName string, ...) (*runtime.Poller[VCentersClientDeleteResponse], error)
- func (client *VCentersClient) Get(ctx context.Context, resourceGroupName string, vcenterName string, ...) (VCentersClientGetResponse, error)
- func (client *VCentersClient) NewListByResourceGroupPager(resourceGroupName string, options *VCentersClientListByResourceGroupOptions) *runtime.Pager[VCentersClientListByResourceGroupResponse]
- func (client *VCentersClient) NewListPager(options *VCentersClientListOptions) *runtime.Pager[VCentersClientListResponse]
- func (client *VCentersClient) Update(ctx context.Context, resourceGroupName string, vcenterName string, ...) (VCentersClientUpdateResponse, error)
- type VCentersClientBeginCreateOptions
- type VCentersClientBeginDeleteOptions
- type VCentersClientCreateResponse
- type VCentersClientDeleteResponse
- type VCentersClientGetOptions
- type VCentersClientGetResponse
- type VCentersClientListByResourceGroupOptions
- type VCentersClientListByResourceGroupResponse
- type VCentersClientListOptions
- type VCentersClientListResponse
- type VCentersClientUpdateOptions
- type VCentersClientUpdateResponse
- type VCentersList
- type VICredential
- type VMGuestPatchClassificationLinux
- type VMGuestPatchClassificationWindows
- type VMGuestPatchRebootSetting
- type VMGuestPatchRebootStatus
- type VirtualDisk
- type VirtualDiskUpdate
- type VirtualMachine
- type VirtualMachineAssessPatchesResult
- type VirtualMachineInstallPatchesParameters
- type VirtualMachineInstallPatchesResult
- type VirtualMachineInventoryItem
- type VirtualMachineProperties
- type VirtualMachineTemplate
- type VirtualMachineTemplateInventoryItem
- type VirtualMachineTemplateProperties
- type VirtualMachineTemplatesClient
- func (client *VirtualMachineTemplatesClient) BeginCreate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[VirtualMachineTemplatesClientCreateResponse], error)
- func (client *VirtualMachineTemplatesClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[VirtualMachineTemplatesClientDeleteResponse], error)
- func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, resourceGroupName string, ...) (VirtualMachineTemplatesClientGetResponse, error)
- func (client *VirtualMachineTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualMachineTemplatesClientListByResourceGroupResponse]
- func (client *VirtualMachineTemplatesClient) NewListPager(options *VirtualMachineTemplatesClientListOptions) *runtime.Pager[VirtualMachineTemplatesClientListResponse]
- func (client *VirtualMachineTemplatesClient) Update(ctx context.Context, resourceGroupName string, ...) (VirtualMachineTemplatesClientUpdateResponse, error)
- type VirtualMachineTemplatesClientBeginCreateOptions
- type VirtualMachineTemplatesClientBeginDeleteOptions
- type VirtualMachineTemplatesClientCreateResponse
- type VirtualMachineTemplatesClientDeleteResponse
- type VirtualMachineTemplatesClientGetOptions
- type VirtualMachineTemplatesClientGetResponse
- type VirtualMachineTemplatesClientListByResourceGroupOptions
- type VirtualMachineTemplatesClientListByResourceGroupResponse
- type VirtualMachineTemplatesClientListOptions
- type VirtualMachineTemplatesClientListResponse
- type VirtualMachineTemplatesClientUpdateOptions
- type VirtualMachineTemplatesClientUpdateResponse
- type VirtualMachineTemplatesList
- type VirtualMachineUpdate
- type VirtualMachineUpdateProperties
- type VirtualMachinesClient
- func (client *VirtualMachinesClient) BeginAssessPatches(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[VirtualMachinesClientAssessPatchesResponse], error)
- func (client *VirtualMachinesClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientCreateResponse], error)
- func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
- func (client *VirtualMachinesClient) BeginInstallPatches(ctx context.Context, resourceGroupName string, name string, ...) (*runtime.Poller[VirtualMachinesClientInstallPatchesResponse], error)
- func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientRestartResponse], error)
- func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
- func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
- func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
- func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (VirtualMachinesClientGetResponse, error)
- func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
- func (client *VirtualMachinesClient) NewListPager(options *VirtualMachinesClientListOptions) *runtime.Pager[VirtualMachinesClientListResponse]
- type VirtualMachinesClientAssessPatchesResponse
- type VirtualMachinesClientBeginAssessPatchesOptions
- type VirtualMachinesClientBeginCreateOptions
- type VirtualMachinesClientBeginDeleteOptions
- type VirtualMachinesClientBeginInstallPatchesOptions
- type VirtualMachinesClientBeginRestartOptions
- type VirtualMachinesClientBeginStartOptions
- type VirtualMachinesClientBeginStopOptions
- type VirtualMachinesClientBeginUpdateOptions
- type VirtualMachinesClientCreateResponse
- type VirtualMachinesClientDeleteResponse
- type VirtualMachinesClientGetOptions
- type VirtualMachinesClientGetResponse
- type VirtualMachinesClientInstallPatchesResponse
- type VirtualMachinesClientListByResourceGroupOptions
- type VirtualMachinesClientListByResourceGroupResponse
- type VirtualMachinesClientListOptions
- type VirtualMachinesClientListResponse
- type VirtualMachinesClientRestartResponse
- type VirtualMachinesClientStartResponse
- type VirtualMachinesClientStopResponse
- type VirtualMachinesClientUpdateResponse
- type VirtualMachinesList
- type VirtualNetwork
- type VirtualNetworkInventoryItem
- type VirtualNetworkProperties
- type VirtualNetworksClient
- func (client *VirtualNetworksClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (*runtime.Poller[VirtualNetworksClientCreateResponse], error)
- func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error)
- func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (VirtualNetworksClientGetResponse, error)
- func (client *VirtualNetworksClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualNetworksClientListByResourceGroupResponse]
- func (client *VirtualNetworksClient) NewListPager(options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse]
- func (client *VirtualNetworksClient) Update(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (VirtualNetworksClientUpdateResponse, error)
- type VirtualNetworksClientBeginCreateOptions
- type VirtualNetworksClientBeginDeleteOptions
- type VirtualNetworksClientCreateResponse
- type VirtualNetworksClientDeleteResponse
- type VirtualNetworksClientGetOptions
- type VirtualNetworksClientGetResponse
- type VirtualNetworksClientListByResourceGroupOptions
- type VirtualNetworksClientListByResourceGroupResponse
- type VirtualNetworksClientListOptions
- type VirtualNetworksClientListResponse
- type VirtualNetworksClientUpdateOptions
- type VirtualNetworksClientUpdateResponse
- type VirtualNetworksList
- type VirtualSCSIController
- type VirtualSCSISharing
- type WindowsParameters
Examples ¶
- ClustersClient.BeginCreate
- ClustersClient.BeginDelete
- ClustersClient.Get
- ClustersClient.NewListByResourceGroupPager
- ClustersClient.NewListPager
- ClustersClient.Update
- DatastoresClient.BeginCreate
- DatastoresClient.BeginDelete
- DatastoresClient.Get
- DatastoresClient.NewListByResourceGroupPager
- DatastoresClient.NewListPager
- DatastoresClient.Update
- GuestAgentsClient.BeginCreate
- GuestAgentsClient.BeginDelete
- GuestAgentsClient.Get
- GuestAgentsClient.NewListByVMPager
- HostsClient.BeginCreate
- HostsClient.BeginDelete
- HostsClient.Get
- HostsClient.NewListByResourceGroupPager
- HostsClient.NewListPager
- HostsClient.Update
- HybridIdentityMetadataClient.Create
- HybridIdentityMetadataClient.Delete
- HybridIdentityMetadataClient.Get
- HybridIdentityMetadataClient.NewListByVMPager
- InventoryItemsClient.Create
- InventoryItemsClient.Delete
- InventoryItemsClient.Get
- InventoryItemsClient.NewListByVCenterPager
- MachineExtensionsClient.BeginCreateOrUpdate
- MachineExtensionsClient.BeginDelete
- MachineExtensionsClient.BeginUpdate
- MachineExtensionsClient.Get
- MachineExtensionsClient.NewListPager
- OperationsClient.NewListPager
- ResourcePoolsClient.BeginCreate
- ResourcePoolsClient.BeginDelete
- ResourcePoolsClient.Get
- ResourcePoolsClient.NewListByResourceGroupPager
- ResourcePoolsClient.NewListPager
- ResourcePoolsClient.Update
- VCentersClient.BeginCreate
- VCentersClient.BeginDelete
- VCentersClient.Get
- VCentersClient.NewListByResourceGroupPager
- VCentersClient.NewListPager
- VCentersClient.Update
- VirtualMachineTemplatesClient.BeginCreate
- VirtualMachineTemplatesClient.BeginDelete
- VirtualMachineTemplatesClient.Get
- VirtualMachineTemplatesClient.NewListByResourceGroupPager
- VirtualMachineTemplatesClient.NewListPager
- VirtualMachineTemplatesClient.Update
- VirtualMachinesClient.BeginAssessPatches
- VirtualMachinesClient.BeginCreate
- VirtualMachinesClient.BeginDelete
- VirtualMachinesClient.BeginInstallPatches
- VirtualMachinesClient.BeginRestart
- VirtualMachinesClient.BeginStart
- VirtualMachinesClient.BeginStop
- VirtualMachinesClient.BeginUpdate
- VirtualMachinesClient.Get
- VirtualMachinesClient.NewListByResourceGroupPager
- VirtualMachinesClient.NewListPager
- VirtualNetworksClient.BeginCreate
- VirtualNetworksClient.BeginDelete
- VirtualNetworksClient.Get
- VirtualNetworksClient.NewListByResourceGroupPager
- VirtualNetworksClient.NewListPager
- VirtualNetworksClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailablePatchCountByClassification ¶
type AvailablePatchCountByClassification struct { // READ-ONLY; Number of critical patches available for installation. Critical *int32 `json:"critical,omitempty" azure:"ro"` // READ-ONLY; Number of definition patches available for installation. Definition *int32 `json:"definition,omitempty" azure:"ro"` // READ-ONLY; Number of feature pack patches available for installation. FeaturePack *int32 `json:"featurePack,omitempty" azure:"ro"` // READ-ONLY; Number of other patches available for installation. Other *int32 `json:"other,omitempty" azure:"ro"` // READ-ONLY; Number of security patches available for installation. Security *int32 `json:"security,omitempty" azure:"ro"` // READ-ONLY; Number of service pack patches available for installation. ServicePack *int32 `json:"servicePack,omitempty" azure:"ro"` // READ-ONLY; Number of tools patches available for installation. Tools *int32 `json:"tools,omitempty" azure:"ro"` // READ-ONLY; Number of update Rollup patches available for installation. UpdateRollup *int32 `json:"updateRollup,omitempty" azure:"ro"` // READ-ONLY; Number of updates category patches available for installation. Updates *int32 `json:"updates,omitempty" azure:"ro"` }
AvailablePatchCountByClassification - Summarization of patches available for installation on the machine by classification.
func (AvailablePatchCountByClassification) MarshalJSON ¶
func (a AvailablePatchCountByClassification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailablePatchCountByClassification.
func (*AvailablePatchCountByClassification) UnmarshalJSON ¶
func (a *AvailablePatchCountByClassification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePatchCountByClassification.
type Cluster ¶
type Cluster struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *ClusterProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
Cluster - Define the cluster.
func (Cluster) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Cluster.
func (*Cluster) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.
type ClusterInventoryItem ¶
type ClusterInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
ClusterInventoryItem - The cluster inventory item.
func (*ClusterInventoryItem) GetInventoryItemProperties ¶
func (c *ClusterInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type ClusterInventoryItem.
func (ClusterInventoryItem) MarshalJSON ¶
func (c ClusterInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterInventoryItem.
func (*ClusterInventoryItem) UnmarshalJSON ¶
func (c *ClusterInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterInventoryItem.
type ClusterProperties ¶
type ClusterProperties struct { // Gets or sets the inventory Item ID for the cluster. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the cluster. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this cluster resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the datastore ARM ids. DatastoreIDs []*string `json:"datastoreIds,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the cluster. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the network ARM ids. NetworkIDs []*string `json:"networkIds,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
ClusterProperties - Defines the resource properties.
func (ClusterProperties) MarshalJSON ¶
func (c ClusterProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterProperties.
func (*ClusterProperties) UnmarshalJSON ¶
func (c *ClusterProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.
type ClustersClient ¶
type ClustersClient struct {
// contains filtered or unexported fields
}
ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.
func NewClustersClient ¶
func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)
NewClustersClient creates a new instance of ClustersClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ClustersClient) BeginCreate ¶
func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, body Cluster, options *ClustersClientBeginCreateOptions) (*runtime.Poller[ClustersClientCreateResponse], error)
BeginCreate - Create Or Update cluster. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. clusterName - Name of the cluster. body - Request payload. options - ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewClustersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "HRCluster", armconnectedvmware.Cluster{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.ClusterProperties{ MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*ClustersClient) BeginDelete ¶
func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error)
BeginDelete - Implements cluster DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. clusterName - Name of the cluster. options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewClustersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRCluster", &armconnectedvmware.ClustersClientBeginDeleteOptions{Force: 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 (*ClustersClient) Get ¶
func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)
Get - Implements cluster GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. clusterName - Name of the cluster. options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewClustersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRCluster", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ClustersClient) NewListByResourceGroupPager ¶
func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of clusters in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClustersByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewClustersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ClustersClient) NewListPager ¶
func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]
NewListPager - List of clusters in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - ClustersClientListOptions contains the optional parameters for the ClustersClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListClusters.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewClustersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ClustersClient) Update ¶
func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, body ResourcePatch, options *ClustersClientUpdateOptions) (ClustersClientUpdateResponse, error)
Update - API to update certain properties of the cluster resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. clusterName - Name of the cluster. body - Resource properties to update. options - ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewClustersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "HRCluster", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ClustersClientBeginCreateOptions ¶
type ClustersClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method.
type ClustersClientBeginDeleteOptions ¶
type ClustersClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
type ClustersClientCreateResponse ¶
type ClustersClientCreateResponse struct {
Cluster
}
ClustersClientCreateResponse contains the response from method ClustersClient.Create.
type ClustersClientDeleteResponse ¶
type ClustersClientDeleteResponse struct { }
ClustersClientDeleteResponse contains the response from method ClustersClient.Delete.
type ClustersClientGetOptions ¶
type ClustersClientGetOptions struct { }
ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
type ClustersClientGetResponse ¶
type ClustersClientGetResponse struct {
Cluster
}
ClustersClientGetResponse contains the response from method ClustersClient.Get.
type ClustersClientListByResourceGroupOptions ¶
type ClustersClientListByResourceGroupOptions struct { }
ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.ListByResourceGroup method.
type ClustersClientListByResourceGroupResponse ¶
type ClustersClientListByResourceGroupResponse struct {
ClustersList
}
ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.ListByResourceGroup.
type ClustersClientListOptions ¶
type ClustersClientListOptions struct { }
ClustersClientListOptions contains the optional parameters for the ClustersClient.List method.
type ClustersClientListResponse ¶
type ClustersClientListResponse struct {
ClustersList
}
ClustersClientListResponse contains the response from method ClustersClient.List.
type ClustersClientUpdateOptions ¶
type ClustersClientUpdateOptions struct { }
ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
type ClustersClientUpdateResponse ¶
type ClustersClientUpdateResponse struct {
Cluster
}
ClustersClientUpdateResponse contains the response from method ClustersClient.Update.
type ClustersList ¶
type ClustersList struct { // REQUIRED; Array of Clusters Value []*Cluster `json:"value,omitempty"` // Url to follow for getting next page of Clusters. NextLink *string `json:"nextLink,omitempty"` }
ClustersList - List of Clusters.
func (ClustersList) MarshalJSON ¶
func (c ClustersList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClustersList.
func (*ClustersList) UnmarshalJSON ¶
func (c *ClustersList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClustersList.
type Condition ¶
type Condition struct { // READ-ONLY; A human readable message indicating details about the status. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The reason for the condition's status. Reason *string `json:"reason,omitempty" azure:"ro"` // READ-ONLY; Severity with which to treat failures of this type of condition. Severity *string `json:"severity,omitempty" azure:"ro"` // READ-ONLY; Status of the condition. Status *string `json:"status,omitempty" azure:"ro"` }
Condition defines an extension to status.
func (Condition) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Condition.
func (*Condition) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Condition.
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 Datastore ¶
type Datastore struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *DatastoreProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
Datastore - Define the datastore.
func (Datastore) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Datastore.
func (*Datastore) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Datastore.
type DatastoreInventoryItem ¶
type DatastoreInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets Maximum capacity of this datastore, in GBs. CapacityGB *int64 `json:"capacityGB,omitempty"` // Gets or sets Available space of this datastore, in GBs. FreeSpaceGB *int64 `json:"freeSpaceGB,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
DatastoreInventoryItem - The datastore inventory item.
func (*DatastoreInventoryItem) GetInventoryItemProperties ¶
func (d *DatastoreInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type DatastoreInventoryItem.
func (DatastoreInventoryItem) MarshalJSON ¶
func (d DatastoreInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatastoreInventoryItem.
func (*DatastoreInventoryItem) UnmarshalJSON ¶
func (d *DatastoreInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreInventoryItem.
type DatastoreProperties ¶
type DatastoreProperties struct { // Gets or sets the inventory Item ID for the datastore. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the datastore. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this datastore resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the datastore. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
DatastoreProperties - Defines the resource properties.
func (DatastoreProperties) MarshalJSON ¶
func (d DatastoreProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatastoreProperties.
func (*DatastoreProperties) UnmarshalJSON ¶
func (d *DatastoreProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreProperties.
type DatastoresClient ¶
type DatastoresClient struct {
// contains filtered or unexported fields
}
DatastoresClient contains the methods for the Datastores group. Don't use this type directly, use NewDatastoresClient() instead.
func NewDatastoresClient ¶
func NewDatastoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatastoresClient, error)
NewDatastoresClient creates a new instance of DatastoresClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*DatastoresClient) BeginCreate ¶
func (client *DatastoresClient) BeginCreate(ctx context.Context, resourceGroupName string, datastoreName string, body Datastore, options *DatastoresClientBeginCreateOptions) (*runtime.Poller[DatastoresClientCreateResponse], error)
BeginCreate - Create Or Update datastore. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. datastoreName - Name of the datastore. body - Request payload. options - DatastoresClientBeginCreateOptions contains the optional parameters for the DatastoresClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateDatastore.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewDatastoresClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "HRDatastore", armconnectedvmware.Datastore{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.DatastoreProperties{ MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*DatastoresClient) BeginDelete ¶
func (client *DatastoresClient) BeginDelete(ctx context.Context, resourceGroupName string, datastoreName string, options *DatastoresClientBeginDeleteOptions) (*runtime.Poller[DatastoresClientDeleteResponse], error)
BeginDelete - Implements datastore DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. datastoreName - Name of the datastore. options - DatastoresClientBeginDeleteOptions contains the optional parameters for the DatastoresClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteDatastore.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewDatastoresClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRDatastore", &armconnectedvmware.DatastoresClientBeginDeleteOptions{Force: 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 (*DatastoresClient) Get ¶
func (client *DatastoresClient) Get(ctx context.Context, resourceGroupName string, datastoreName string, options *DatastoresClientGetOptions) (DatastoresClientGetResponse, error)
Get - Implements datastore GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. datastoreName - Name of the datastore. options - DatastoresClientGetOptions contains the optional parameters for the DatastoresClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetDatastore.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewDatastoresClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRDatastore", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*DatastoresClient) NewListByResourceGroupPager ¶
func (client *DatastoresClient) NewListByResourceGroupPager(resourceGroupName string, options *DatastoresClientListByResourceGroupOptions) *runtime.Pager[DatastoresClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of datastores in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - DatastoresClientListByResourceGroupOptions contains the optional parameters for the DatastoresClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastoresByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewDatastoresClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatastoresClient) NewListPager ¶
func (client *DatastoresClient) NewListPager(options *DatastoresClientListOptions) *runtime.Pager[DatastoresClientListResponse]
NewListPager - List of datastores in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - DatastoresClientListOptions contains the optional parameters for the DatastoresClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListDatastores.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewDatastoresClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatastoresClient) Update ¶
func (client *DatastoresClient) Update(ctx context.Context, resourceGroupName string, datastoreName string, body ResourcePatch, options *DatastoresClientUpdateOptions) (DatastoresClientUpdateResponse, error)
Update - API to update certain properties of the datastore resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. datastoreName - Name of the datastore. body - Resource properties to update. options - DatastoresClientUpdateOptions contains the optional parameters for the DatastoresClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateDatastore.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewDatastoresClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "HRDatastore", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type DatastoresClientBeginCreateOptions ¶
type DatastoresClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatastoresClientBeginCreateOptions contains the optional parameters for the DatastoresClient.BeginCreate method.
type DatastoresClientBeginDeleteOptions ¶
type DatastoresClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
DatastoresClientBeginDeleteOptions contains the optional parameters for the DatastoresClient.BeginDelete method.
type DatastoresClientCreateResponse ¶
type DatastoresClientCreateResponse struct {
Datastore
}
DatastoresClientCreateResponse contains the response from method DatastoresClient.Create.
type DatastoresClientDeleteResponse ¶
type DatastoresClientDeleteResponse struct { }
DatastoresClientDeleteResponse contains the response from method DatastoresClient.Delete.
type DatastoresClientGetOptions ¶
type DatastoresClientGetOptions struct { }
DatastoresClientGetOptions contains the optional parameters for the DatastoresClient.Get method.
type DatastoresClientGetResponse ¶
type DatastoresClientGetResponse struct {
Datastore
}
DatastoresClientGetResponse contains the response from method DatastoresClient.Get.
type DatastoresClientListByResourceGroupOptions ¶
type DatastoresClientListByResourceGroupOptions struct { }
DatastoresClientListByResourceGroupOptions contains the optional parameters for the DatastoresClient.ListByResourceGroup method.
type DatastoresClientListByResourceGroupResponse ¶
type DatastoresClientListByResourceGroupResponse struct {
DatastoresList
}
DatastoresClientListByResourceGroupResponse contains the response from method DatastoresClient.ListByResourceGroup.
type DatastoresClientListOptions ¶
type DatastoresClientListOptions struct { }
DatastoresClientListOptions contains the optional parameters for the DatastoresClient.List method.
type DatastoresClientListResponse ¶
type DatastoresClientListResponse struct {
DatastoresList
}
DatastoresClientListResponse contains the response from method DatastoresClient.List.
type DatastoresClientUpdateOptions ¶
type DatastoresClientUpdateOptions struct { }
DatastoresClientUpdateOptions contains the optional parameters for the DatastoresClient.Update method.
type DatastoresClientUpdateResponse ¶
type DatastoresClientUpdateResponse struct {
Datastore
}
DatastoresClientUpdateResponse contains the response from method DatastoresClient.Update.
type DatastoresList ¶
type DatastoresList struct { // REQUIRED; Array of Datastores Value []*Datastore `json:"value,omitempty"` // Url to follow for getting next page of Datastores. NextLink *string `json:"nextLink,omitempty"` }
DatastoresList - List of Datastores.
func (DatastoresList) MarshalJSON ¶
func (d DatastoresList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatastoresList.
func (*DatastoresList) UnmarshalJSON ¶
func (d *DatastoresList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatastoresList.
type DiskMode ¶
type DiskMode string
DiskMode - Defines the different types of disk modes.
func PossibleDiskModeValues ¶
func PossibleDiskModeValues() []DiskMode
PossibleDiskModeValues returns the possible values for the DiskMode const type.
type DiskType ¶
type DiskType string
DiskType - Defines the different types of disks.
func PossibleDiskTypeValues ¶
func PossibleDiskTypeValues() []DiskType
PossibleDiskTypeValues returns the possible values for the DiskType const type.
type ErrorDefinition ¶
type ErrorDefinition struct { // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; Internal error details. Details []*ErrorDefinition `json:"details,omitempty" azure:"ro"` // READ-ONLY; Description of the error. Message *string `json:"message,omitempty" azure:"ro"` }
ErrorDefinition - Error definition.
func (ErrorDefinition) MarshalJSON ¶
func (e ErrorDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.
func (*ErrorDefinition) UnmarshalJSON ¶
func (e *ErrorDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.
type ErrorDetail ¶
type ErrorDetail struct { // REQUIRED; The error's code. Code *string `json:"code,omitempty"` // REQUIRED; A human readable error message. Message *string `json:"message,omitempty"` // Additional error details. Details []*ErrorDetail `json:"details,omitempty"` // Indicates which property in the request is responsible for the error. Target *string `json:"target,omitempty"` }
ErrorDetail - Error details.
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 ErrorResponse ¶
type ErrorResponse struct { // The error details. Error *ErrorDefinition `json:"error,omitempty"` }
ErrorResponse - Error response.
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ExtendedLocation ¶
type ExtendedLocation struct { // The extended location name. Name *string `json:"name,omitempty"` // The extended location type. Type *string `json:"type,omitempty"` }
ExtendedLocation - 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 FirmwareType ¶
type FirmwareType string
FirmwareType - Firmware type
const ( FirmwareTypeBios FirmwareType = "bios" FirmwareTypeEfi FirmwareType = "efi" )
func PossibleFirmwareTypeValues ¶
func PossibleFirmwareTypeValues() []FirmwareType
PossibleFirmwareTypeValues returns the possible values for the FirmwareType const type.
type GuestAgent ¶
type GuestAgent struct { // REQUIRED; Resource properties. Properties *GuestAgentProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
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 GuestAgentList ¶
type GuestAgentList struct { // REQUIRED; Array of GuestAgent Value []*GuestAgent `json:"value,omitempty"` // Url to follow for getting next page of GuestAgent. NextLink *string `json:"nextLink,omitempty"` }
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 GuestAgentProfile ¶
type GuestAgentProfile struct { // READ-ONLY; The hybrid machine agent full version. AgentVersion *string `json:"agentVersion,omitempty" azure:"ro"` // READ-ONLY; Details about the error state. ErrorDetails []*ErrorDetail `json:"errorDetails,omitempty" azure:"ro"` // READ-ONLY; The time of the last status change. LastStatusChange *time.Time `json:"lastStatusChange,omitempty" azure:"ro"` // READ-ONLY; The status of the hybrid machine agent. Status *StatusTypes `json:"status,omitempty" azure:"ro"` // READ-ONLY; Specifies the VM's unique SMBIOS ID. VMUUID *string `json:"vmUuid,omitempty" azure:"ro"` }
GuestAgentProfile - Defines the resource properties.
func (GuestAgentProfile) MarshalJSON ¶
func (g GuestAgentProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestAgentProfile.
func (*GuestAgentProfile) UnmarshalJSON ¶
func (g *GuestAgentProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgentProfile.
type GuestAgentProperties ¶
type GuestAgentProperties struct { // Username / Password Credentials to provision guest agent. Credentials *GuestCredential `json:"credentials,omitempty"` // HTTP Proxy configuration for the VM. HTTPProxyConfig *HTTPProxyConfiguration `json:"httpProxyConfig,omitempty"` // Gets or sets the guest agent provisioning action. ProvisioningAction *ProvisioningAction `json:"provisioningAction,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the guest agent status. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
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(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GuestAgentsClient, error)
NewGuestAgentsClient creates a new instance of GuestAgentsClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GuestAgentsClient) BeginCreate ¶
func (client *GuestAgentsClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualMachineName string, name string, body GuestAgent, options *GuestAgentsClientBeginCreateOptions) (*runtime.Poller[GuestAgentsClientCreateResponse], error)
BeginCreate - Create Or Update GuestAgent. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. name - Name of the guestAgents. body - Request payload. options - GuestAgentsClientBeginCreateOptions contains the optional parameters for the GuestAgentsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateGuestAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewGuestAgentsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "ContosoVm", "default", armconnectedvmware.GuestAgent{ Properties: &armconnectedvmware.GuestAgentProperties{ Credentials: &armconnectedvmware.GuestCredential{ Password: to.Ptr("<password>"), Username: to.Ptr("tempuser"), }, HTTPProxyConfig: &armconnectedvmware.HTTPProxyConfiguration{ HTTPSProxy: to.Ptr("http://192.1.2.3:8080"), }, ProvisioningAction: to.Ptr(armconnectedvmware.ProvisioningActionInstall), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*GuestAgentsClient) BeginDelete ¶
func (client *GuestAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, name string, options *GuestAgentsClientBeginDeleteOptions) (*runtime.Poller[GuestAgentsClientDeleteResponse], error)
BeginDelete - Implements GuestAgent DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. name - Name of the GuestAgent. options - GuestAgentsClientBeginDeleteOptions contains the optional parameters for the GuestAgentsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteGuestAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewGuestAgentsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "ContosoVm", "default", 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 (*GuestAgentsClient) Get ¶
func (client *GuestAgentsClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, name string, options *GuestAgentsClientGetOptions) (GuestAgentsClientGetResponse, error)
Get - Implements GuestAgent GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. name - Name of the GuestAgent. options - GuestAgentsClientGetOptions contains the optional parameters for the GuestAgentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetGuestAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewGuestAgentsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ContosoVm", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*GuestAgentsClient) NewListByVMPager ¶
func (client *GuestAgentsClient) NewListByVMPager(resourceGroupName string, virtualMachineName string, options *GuestAgentsClientListByVMOptions) *runtime.Pager[GuestAgentsClientListByVMResponse]
NewListByVMPager - Returns the list of GuestAgent of the given vm. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. options - GuestAgentsClientListByVMOptions contains the optional parameters for the GuestAgentsClient.ListByVM method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GuestAgent_ListByVm.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewGuestAgentsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByVMPager("testrg", "ContosoVm", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type GuestAgentsClientBeginCreateOptions ¶
type GuestAgentsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GuestAgentsClientBeginCreateOptions contains the optional parameters for the GuestAgentsClient.BeginCreate method.
type GuestAgentsClientBeginDeleteOptions ¶
type GuestAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GuestAgentsClientBeginDeleteOptions contains the optional parameters for the GuestAgentsClient.BeginDelete method.
type GuestAgentsClientCreateResponse ¶
type GuestAgentsClientCreateResponse struct {
GuestAgent
}
GuestAgentsClientCreateResponse contains the response from method GuestAgentsClient.Create.
type GuestAgentsClientDeleteResponse ¶
type GuestAgentsClientDeleteResponse struct { }
GuestAgentsClientDeleteResponse contains the response from method GuestAgentsClient.Delete.
type GuestAgentsClientGetOptions ¶
type GuestAgentsClientGetOptions struct { }
GuestAgentsClientGetOptions contains the optional parameters for the GuestAgentsClient.Get method.
type GuestAgentsClientGetResponse ¶
type GuestAgentsClientGetResponse struct {
GuestAgent
}
GuestAgentsClientGetResponse contains the response from method GuestAgentsClient.Get.
type GuestAgentsClientListByVMOptions ¶
type GuestAgentsClientListByVMOptions struct { }
GuestAgentsClientListByVMOptions contains the optional parameters for the GuestAgentsClient.ListByVM method.
type GuestAgentsClientListByVMResponse ¶
type GuestAgentsClientListByVMResponse struct {
GuestAgentList
}
GuestAgentsClientListByVMResponse contains the response from method GuestAgentsClient.ListByVM.
type GuestCredential ¶
type GuestCredential struct { // Gets or sets the password to connect with the guest. Password *string `json:"password,omitempty"` // Gets or sets username to connect with the guest. Username *string `json:"username,omitempty"` }
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 { // Gets or sets httpsProxy url. HTTPSProxy *string `json:"httpsProxy,omitempty"` }
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 HardwareProfile ¶
type HardwareProfile struct { // Gets or sets memory size in MBs for the vm. MemorySizeMB *int32 `json:"memorySizeMB,omitempty"` // Gets or sets the number of vCPUs for the vm. NumCPUs *int32 `json:"numCPUs,omitempty"` // Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified. NumCoresPerSocket *int32 `json:"numCoresPerSocket,omitempty"` // READ-ONLY; Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running. CPUHotAddEnabled *bool `json:"cpuHotAddEnabled,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running. CPUHotRemoveEnabled *bool `json:"cpuHotRemoveEnabled,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a value indicating whether memory can be added while this virtual machine is running. MemoryHotAddEnabled *bool `json:"memoryHotAddEnabled,omitempty" azure:"ro"` }
HardwareProfile - Defines the resource properties.
func (HardwareProfile) MarshalJSON ¶
func (h HardwareProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareProfile.
func (*HardwareProfile) UnmarshalJSON ¶
func (h *HardwareProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfile.
type Host ¶
type Host struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *HostProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
Host - Define the host.
func (Host) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Host.
func (*Host) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Host.
type HostInventoryItem ¶
type HostInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // Parent host inventory resource details. Parent *InventoryItemDetails `json:"parent,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
HostInventoryItem - The host inventory item.
func (*HostInventoryItem) GetInventoryItemProperties ¶
func (h *HostInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type HostInventoryItem.
func (HostInventoryItem) MarshalJSON ¶
func (h HostInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HostInventoryItem.
func (*HostInventoryItem) UnmarshalJSON ¶
func (h *HostInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HostInventoryItem.
type HostProperties ¶
type HostProperties struct { // Gets or sets the inventory Item ID for the host. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the host. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this host resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the host. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
HostProperties - Defines the resource properties.
func (HostProperties) MarshalJSON ¶
func (h HostProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HostProperties.
func (*HostProperties) UnmarshalJSON ¶
func (h *HostProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HostProperties.
type HostsClient ¶
type HostsClient struct {
// contains filtered or unexported fields
}
HostsClient contains the methods for the Hosts group. Don't use this type directly, use NewHostsClient() instead.
func NewHostsClient ¶
func NewHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostsClient, error)
NewHostsClient creates a new instance of HostsClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*HostsClient) BeginCreate ¶
func (client *HostsClient) BeginCreate(ctx context.Context, resourceGroupName string, hostName string, body Host, options *HostsClientBeginCreateOptions) (*runtime.Poller[HostsClientCreateResponse], error)
BeginCreate - Create Or Update host. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. hostName - Name of the host. body - Request payload. options - HostsClientBeginCreateOptions contains the optional parameters for the HostsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHostsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "HRHost", armconnectedvmware.Host{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.HostProperties{ MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*HostsClient) BeginDelete ¶
func (client *HostsClient) BeginDelete(ctx context.Context, resourceGroupName string, hostName string, options *HostsClientBeginDeleteOptions) (*runtime.Poller[HostsClientDeleteResponse], error)
BeginDelete - Implements host DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. hostName - Name of the host. options - HostsClientBeginDeleteOptions contains the optional parameters for the HostsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHostsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRHost", &armconnectedvmware.HostsClientBeginDeleteOptions{Force: 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 (*HostsClient) Get ¶
func (client *HostsClient) Get(ctx context.Context, resourceGroupName string, hostName string, options *HostsClientGetOptions) (HostsClientGetResponse, error)
Get - Implements host GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. hostName - Name of the host. options - HostsClientGetOptions contains the optional parameters for the HostsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHostsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRHost", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*HostsClient) NewListByResourceGroupPager ¶
func (client *HostsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostsClientListByResourceGroupOptions) *runtime.Pager[HostsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of hosts in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - HostsClientListByResourceGroupOptions contains the optional parameters for the HostsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHostsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHostsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*HostsClient) NewListPager ¶
func (client *HostsClient) NewListPager(options *HostsClientListOptions) *runtime.Pager[HostsClientListResponse]
NewListPager - List of hosts in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - HostsClientListOptions contains the optional parameters for the HostsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListHosts.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHostsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*HostsClient) Update ¶
func (client *HostsClient) Update(ctx context.Context, resourceGroupName string, hostName string, body ResourcePatch, options *HostsClientUpdateOptions) (HostsClientUpdateResponse, error)
Update - API to update certain properties of the host resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. hostName - Name of the host. body - Resource properties to update. options - HostsClientUpdateOptions contains the optional parameters for the HostsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateHost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHostsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "HRHost", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type HostsClientBeginCreateOptions ¶
type HostsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
HostsClientBeginCreateOptions contains the optional parameters for the HostsClient.BeginCreate method.
type HostsClientBeginDeleteOptions ¶
type HostsClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
HostsClientBeginDeleteOptions contains the optional parameters for the HostsClient.BeginDelete method.
type HostsClientCreateResponse ¶
type HostsClientCreateResponse struct {
Host
}
HostsClientCreateResponse contains the response from method HostsClient.Create.
type HostsClientDeleteResponse ¶
type HostsClientDeleteResponse struct { }
HostsClientDeleteResponse contains the response from method HostsClient.Delete.
type HostsClientGetOptions ¶
type HostsClientGetOptions struct { }
HostsClientGetOptions contains the optional parameters for the HostsClient.Get method.
type HostsClientGetResponse ¶
type HostsClientGetResponse struct {
Host
}
HostsClientGetResponse contains the response from method HostsClient.Get.
type HostsClientListByResourceGroupOptions ¶
type HostsClientListByResourceGroupOptions struct { }
HostsClientListByResourceGroupOptions contains the optional parameters for the HostsClient.ListByResourceGroup method.
type HostsClientListByResourceGroupResponse ¶
type HostsClientListByResourceGroupResponse struct {
HostsList
}
HostsClientListByResourceGroupResponse contains the response from method HostsClient.ListByResourceGroup.
type HostsClientListOptions ¶
type HostsClientListOptions struct { }
HostsClientListOptions contains the optional parameters for the HostsClient.List method.
type HostsClientListResponse ¶
type HostsClientListResponse struct {
HostsList
}
HostsClientListResponse contains the response from method HostsClient.List.
type HostsClientUpdateOptions ¶
type HostsClientUpdateOptions struct { }
HostsClientUpdateOptions contains the optional parameters for the HostsClient.Update method.
type HostsClientUpdateResponse ¶
type HostsClientUpdateResponse struct {
Host
}
HostsClientUpdateResponse contains the response from method HostsClient.Update.
type HostsList ¶
type HostsList struct { // REQUIRED; Array of Hosts Value []*Host `json:"value,omitempty"` // Url to follow for getting next page of Hosts. NextLink *string `json:"nextLink,omitempty"` }
HostsList - List of Hosts.
func (HostsList) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type HostsList.
func (*HostsList) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type HostsList.
type HybridIdentityMetadata ¶
type HybridIdentityMetadata struct { // REQUIRED; Resource properties. Properties *HybridIdentityMetadataProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
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(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HybridIdentityMetadataClient, error)
NewHybridIdentityMetadataClient creates a new instance of HybridIdentityMetadataClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*HybridIdentityMetadataClient) Create ¶
func (client *HybridIdentityMetadataClient) Create(ctx context.Context, resourceGroupName string, virtualMachineName string, metadataName string, body HybridIdentityMetadata, options *HybridIdentityMetadataClientCreateOptions) (HybridIdentityMetadataClientCreateResponse, error)
Create - Create Or Update HybridIdentityMetadata. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. metadataName - Name of the hybridIdentityMetadata. body - Request payload. options - HybridIdentityMetadataClientCreateOptions contains the optional parameters for the HybridIdentityMetadataClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateHybridIdentityMetadata.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHybridIdentityMetadataClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Create(ctx, "testrg", "ContosoVm", "default", armconnectedvmware.HybridIdentityMetadata{ Properties: &armconnectedvmware.HybridIdentityMetadataProperties{ PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"), VMID: to.Ptr("f8b82dff-38ef-4220-99ef-d3a3f86ddc6c"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*HybridIdentityMetadataClient) Delete ¶
func (client *HybridIdentityMetadataClient) Delete(ctx context.Context, resourceGroupName string, virtualMachineName string, metadataName string, options *HybridIdentityMetadataClientDeleteOptions) (HybridIdentityMetadataClientDeleteResponse, error)
Delete - Implements HybridIdentityMetadata DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. metadataName - Name of the HybridIdentityMetadata. options - HybridIdentityMetadataClientDeleteOptions contains the optional parameters for the HybridIdentityMetadataClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteHybridIdentityMetadata.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHybridIdentityMetadataClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "testrg", "ContosoVm", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*HybridIdentityMetadataClient) Get ¶
func (client *HybridIdentityMetadataClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, metadataName string, options *HybridIdentityMetadataClientGetOptions) (HybridIdentityMetadataClientGetResponse, error)
Get - Implements HybridIdentityMetadata GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. metadataName - Name of the HybridIdentityMetadata. options - HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetHybridIdentityMetadata.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHybridIdentityMetadataClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ContosoVm", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*HybridIdentityMetadataClient) NewListByVMPager ¶
func (client *HybridIdentityMetadataClient) NewListByVMPager(resourceGroupName string, virtualMachineName string, options *HybridIdentityMetadataClientListByVMOptions) *runtime.Pager[HybridIdentityMetadataClientListByVMResponse]
NewListByVMPager - Returns the list of HybridIdentityMetadata of the given vm. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the vm. options - HybridIdentityMetadataClientListByVMOptions contains the optional parameters for the HybridIdentityMetadataClient.ListByVM method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/HybridIdentityMetadata_ListByVm.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewHybridIdentityMetadataClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByVMPager("testrg", "ContosoVm", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type HybridIdentityMetadataClientCreateOptions ¶
type HybridIdentityMetadataClientCreateOptions struct { }
HybridIdentityMetadataClientCreateOptions contains the optional parameters for the HybridIdentityMetadataClient.Create method.
type HybridIdentityMetadataClientCreateResponse ¶
type HybridIdentityMetadataClientCreateResponse struct {
HybridIdentityMetadata
}
HybridIdentityMetadataClientCreateResponse contains the response from method HybridIdentityMetadataClient.Create.
type HybridIdentityMetadataClientDeleteOptions ¶
type HybridIdentityMetadataClientDeleteOptions struct { }
HybridIdentityMetadataClientDeleteOptions contains the optional parameters for the HybridIdentityMetadataClient.Delete method.
type HybridIdentityMetadataClientDeleteResponse ¶
type HybridIdentityMetadataClientDeleteResponse struct { }
HybridIdentityMetadataClientDeleteResponse contains the response from method HybridIdentityMetadataClient.Delete.
type HybridIdentityMetadataClientGetOptions ¶
type HybridIdentityMetadataClientGetOptions struct { }
HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get method.
type HybridIdentityMetadataClientGetResponse ¶
type HybridIdentityMetadataClientGetResponse struct {
HybridIdentityMetadata
}
HybridIdentityMetadataClientGetResponse contains the response from method HybridIdentityMetadataClient.Get.
type HybridIdentityMetadataClientListByVMOptions ¶
type HybridIdentityMetadataClientListByVMOptions struct { }
HybridIdentityMetadataClientListByVMOptions contains the optional parameters for the HybridIdentityMetadataClient.ListByVM method.
type HybridIdentityMetadataClientListByVMResponse ¶
type HybridIdentityMetadataClientListByVMResponse struct {
HybridIdentityMetadataList
}
HybridIdentityMetadataClientListByVMResponse contains the response from method HybridIdentityMetadataClient.ListByVM.
type HybridIdentityMetadataList ¶
type HybridIdentityMetadataList struct { // REQUIRED; Array of HybridIdentityMetadata Value []*HybridIdentityMetadata `json:"value,omitempty"` // Url to follow for getting next page of HybridIdentityMetadata. NextLink *string `json:"nextLink,omitempty"` }
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 { // Gets or sets the Public Key. PublicKey *string `json:"publicKey,omitempty"` // Gets or sets the Vm Id. VMID *string `json:"vmId,omitempty"` // READ-ONLY; The identity of the resource. Identity *Identity `json:"identity,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
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 IPAddressAllocationMethod ¶
type IPAddressAllocationMethod string
IPAddressAllocationMethod - IP address allocation method.
const ( IPAddressAllocationMethodDynamic IPAddressAllocationMethod = "dynamic" IPAddressAllocationMethodLinklayer IPAddressAllocationMethod = "linklayer" IPAddressAllocationMethodOther IPAddressAllocationMethod = "other" IPAddressAllocationMethodRandom IPAddressAllocationMethod = "random" IPAddressAllocationMethodStatic IPAddressAllocationMethod = "static" IPAddressAllocationMethodUnset IPAddressAllocationMethod = "unset" )
func PossibleIPAddressAllocationMethodValues ¶
func PossibleIPAddressAllocationMethodValues() []IPAddressAllocationMethod
PossibleIPAddressAllocationMethodValues returns the possible values for the IPAddressAllocationMethod const type.
type Identity ¶
type Identity struct { // REQUIRED; The type of managed service identity. Type *IdentityType `json:"type,omitempty"` // READ-ONLY; The principal id of managed service identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant of managed service identity. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
Identity - Managed service identity.
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 IdentityType ¶
type IdentityType string
IdentityType - The type of managed service identity.
const ( IdentityTypeNone IdentityType = "None" IdentityTypeSystemAssigned IdentityType = "SystemAssigned" )
func PossibleIdentityTypeValues ¶
func PossibleIdentityTypeValues() []IdentityType
PossibleIdentityTypeValues returns the possible values for the IdentityType const type.
type InventoryItem ¶
type InventoryItem struct { // REQUIRED; Resource properties. Properties InventoryItemPropertiesClassification `json:"properties,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
InventoryItem - Defines the inventory item.
func (InventoryItem) MarshalJSON ¶
func (i InventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InventoryItem.
func (*InventoryItem) UnmarshalJSON ¶
func (i *InventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItem.
type InventoryItemDetails ¶
type InventoryItemDetails struct { // Gets or sets the inventory Item ID for the resource. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter Managed Object name for the resource. MoName *string `json:"moName,omitempty"` }
InventoryItemDetails - Defines the resource properties.
func (InventoryItemDetails) MarshalJSON ¶
func (i InventoryItemDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InventoryItemDetails.
func (*InventoryItemDetails) UnmarshalJSON ¶
func (i *InventoryItemDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItemDetails.
type InventoryItemProperties ¶
type InventoryItemProperties struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
InventoryItemProperties - Defines the resource properties.
func (*InventoryItemProperties) GetInventoryItemProperties ¶
func (i *InventoryItemProperties) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type InventoryItemProperties.
func (InventoryItemProperties) MarshalJSON ¶
func (i InventoryItemProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InventoryItemProperties.
func (*InventoryItemProperties) UnmarshalJSON ¶
func (i *InventoryItemProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItemProperties.
type InventoryItemPropertiesClassification ¶
type InventoryItemPropertiesClassification interface { // GetInventoryItemProperties returns the InventoryItemProperties content of the underlying type. GetInventoryItemProperties() *InventoryItemProperties }
InventoryItemPropertiesClassification provides polymorphic access to related types. Call the interface's GetInventoryItemProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ClusterInventoryItem, *DatastoreInventoryItem, *HostInventoryItem, *InventoryItemProperties, *ResourcePoolInventoryItem, - *VirtualMachineInventoryItem, *VirtualMachineTemplateInventoryItem, *VirtualNetworkInventoryItem
type InventoryItemsClient ¶
type InventoryItemsClient struct {
// contains filtered or unexported fields
}
InventoryItemsClient contains the methods for the InventoryItems group. Don't use this type directly, use NewInventoryItemsClient() instead.
func NewInventoryItemsClient ¶
func NewInventoryItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InventoryItemsClient, error)
NewInventoryItemsClient creates a new instance of InventoryItemsClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*InventoryItemsClient) Create ¶
func (client *InventoryItemsClient) Create(ctx context.Context, resourceGroupName string, vcenterName string, inventoryItemName string, body InventoryItem, options *InventoryItemsClientCreateOptions) (InventoryItemsClientCreateResponse, error)
Create - Create Or Update InventoryItem. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. inventoryItemName - Name of the inventoryItem. body - Request payload. options - InventoryItemsClientCreateOptions contains the optional parameters for the InventoryItemsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateInventoryItem.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Create(ctx, "testrg", "ContosoVCenter", "testItem", armconnectedvmware.InventoryItem{ Properties: &armconnectedvmware.ResourcePoolInventoryItem{ InventoryType: to.Ptr(armconnectedvmware.InventoryTypeResourcePool), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InventoryItemsClient) Delete ¶
func (client *InventoryItemsClient) Delete(ctx context.Context, resourceGroupName string, vcenterName string, inventoryItemName string, options *InventoryItemsClientDeleteOptions) (InventoryItemsClientDeleteResponse, error)
Delete - Implements inventoryItem DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. inventoryItemName - Name of the inventoryItem. options - InventoryItemsClientDeleteOptions contains the optional parameters for the InventoryItemsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteInventoryItem.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "testrg", "ContosoVCenter", "testItem", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*InventoryItemsClient) Get ¶
func (client *InventoryItemsClient) Get(ctx context.Context, resourceGroupName string, vcenterName string, inventoryItemName string, options *InventoryItemsClientGetOptions) (InventoryItemsClientGetResponse, error)
Get - Implements InventoryItem GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. inventoryItemName - Name of the inventoryItem. options - InventoryItemsClientGetOptions contains the optional parameters for the InventoryItemsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetInventoryItem.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ContosoVCenter", "testItem", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InventoryItemsClient) NewListByVCenterPager ¶
func (client *InventoryItemsClient) NewListByVCenterPager(resourceGroupName string, vcenterName string, options *InventoryItemsClientListByVCenterOptions) *runtime.Pager[InventoryItemsClientListByVCenterResponse]
NewListByVCenterPager - Returns the list of inventoryItems of the given vCenter. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. options - InventoryItemsClientListByVCenterOptions contains the optional parameters for the InventoryItemsClient.ListByVCenter method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/InventoryItems_ListByVCenter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByVCenterPager("testrg", "ContosoVCenter", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InventoryItemsClientCreateOptions ¶
type InventoryItemsClientCreateOptions struct { }
InventoryItemsClientCreateOptions contains the optional parameters for the InventoryItemsClient.Create method.
type InventoryItemsClientCreateResponse ¶
type InventoryItemsClientCreateResponse struct {
InventoryItem
}
InventoryItemsClientCreateResponse contains the response from method InventoryItemsClient.Create.
type InventoryItemsClientDeleteOptions ¶
type InventoryItemsClientDeleteOptions struct { }
InventoryItemsClientDeleteOptions contains the optional parameters for the InventoryItemsClient.Delete method.
type InventoryItemsClientDeleteResponse ¶
type InventoryItemsClientDeleteResponse struct { }
InventoryItemsClientDeleteResponse contains the response from method InventoryItemsClient.Delete.
type InventoryItemsClientGetOptions ¶
type InventoryItemsClientGetOptions struct { }
InventoryItemsClientGetOptions contains the optional parameters for the InventoryItemsClient.Get method.
type InventoryItemsClientGetResponse ¶
type InventoryItemsClientGetResponse struct {
InventoryItem
}
InventoryItemsClientGetResponse contains the response from method InventoryItemsClient.Get.
type InventoryItemsClientListByVCenterOptions ¶
type InventoryItemsClientListByVCenterOptions struct { }
InventoryItemsClientListByVCenterOptions contains the optional parameters for the InventoryItemsClient.ListByVCenter method.
type InventoryItemsClientListByVCenterResponse ¶
type InventoryItemsClientListByVCenterResponse struct {
InventoryItemsList
}
InventoryItemsClientListByVCenterResponse contains the response from method InventoryItemsClient.ListByVCenter.
type InventoryItemsList ¶
type InventoryItemsList struct { // REQUIRED; Array of InventoryItems Value []*InventoryItem `json:"value,omitempty"` // Url to follow for getting next page of InventoryItems. NextLink *string `json:"nextLink,omitempty"` }
InventoryItemsList - List of InventoryItems.
func (InventoryItemsList) MarshalJSON ¶
func (i InventoryItemsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InventoryItemsList.
func (*InventoryItemsList) UnmarshalJSON ¶
func (i *InventoryItemsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItemsList.
type InventoryType ¶
type InventoryType string
InventoryType - The inventory type.
const ( InventoryTypeCluster InventoryType = "Cluster" InventoryTypeDatastore InventoryType = "Datastore" InventoryTypeHost InventoryType = "Host" InventoryTypeResourcePool InventoryType = "ResourcePool" InventoryTypeVirtualMachine InventoryType = "VirtualMachine" InventoryTypeVirtualMachineTemplate InventoryType = "VirtualMachineTemplate" InventoryTypeVirtualNetwork InventoryType = "VirtualNetwork" )
func PossibleInventoryTypeValues ¶
func PossibleInventoryTypeValues() []InventoryType
PossibleInventoryTypeValues returns the possible values for the InventoryType const type.
type LinuxParameters ¶
type LinuxParameters struct { // The update classifications to select when installing patches for Linux. ClassificationsToInclude []*VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"` // packages to exclude in the patch operation. Format: packageName_packageVersion PackageNameMasksToExclude []*string `json:"packageNameMasksToExclude,omitempty"` // packages to include in the patch operation. Format: packageName_packageVersion PackageNameMasksToInclude []*string `json:"packageNameMasksToInclude,omitempty"` }
LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API
func (LinuxParameters) MarshalJSON ¶
func (l LinuxParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LinuxParameters.
func (*LinuxParameters) UnmarshalJSON ¶
func (l *LinuxParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LinuxParameters.
type MachineExtension ¶
type MachineExtension struct { // Gets or sets the location. Location *string `json:"location,omitempty"` // Describes Machine Extension Properties. Properties *MachineExtensionProperties `json:"properties,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
MachineExtension - Describes a Machine Extension.
func (MachineExtension) MarshalJSON ¶
func (m MachineExtension) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtension.
func (*MachineExtension) UnmarshalJSON ¶
func (m *MachineExtension) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtension.
type MachineExtensionInstanceView ¶
type MachineExtensionInstanceView struct { // Instance view status. Status *MachineExtensionInstanceViewStatus `json:"status,omitempty"` // READ-ONLY; The machine extension name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Specifies the type of the extension; an example is "CustomScriptExtension". Type *string `json:"type,omitempty" azure:"ro"` // READ-ONLY; Specifies the version of the script handler. TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty" azure:"ro"` }
MachineExtensionInstanceView - Describes the Machine Extension Instance View.
func (MachineExtensionInstanceView) MarshalJSON ¶
func (m MachineExtensionInstanceView) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionInstanceView.
func (*MachineExtensionInstanceView) UnmarshalJSON ¶
func (m *MachineExtensionInstanceView) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionInstanceView.
type MachineExtensionInstanceViewStatus ¶
type MachineExtensionInstanceViewStatus struct { // READ-ONLY; The status code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The short localizable label for the status. DisplayStatus *string `json:"displayStatus,omitempty" azure:"ro"` // READ-ONLY; The level code. Level *StatusLevelTypes `json:"level,omitempty" azure:"ro"` // READ-ONLY; The detailed status message, including for alerts and error messages. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The time of the status. Time *time.Time `json:"time,omitempty" azure:"ro"` }
MachineExtensionInstanceViewStatus - Instance view status.
func (MachineExtensionInstanceViewStatus) MarshalJSON ¶
func (m MachineExtensionInstanceViewStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionInstanceViewStatus.
func (*MachineExtensionInstanceViewStatus) UnmarshalJSON ¶
func (m *MachineExtensionInstanceViewStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionInstanceViewStatus.
type MachineExtensionProperties ¶
type MachineExtensionProperties struct { // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, // however, the extension will not upgrade minor versions unless redeployed, even // with this property set to true. AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` // How the extension handler should be forced to update even if the extension configuration has not changed. ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` // The machine extension instance view. InstanceView *MachineExtensionPropertiesInstanceView `json:"instanceView,omitempty"` // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ProtectedSettings interface{} `json:"protectedSettings,omitempty"` // The name of the extension handler publisher. Publisher *string `json:"publisher,omitempty"` // Json formatted public settings for the extension. Settings interface{} `json:"settings,omitempty"` // Specifies the type of the extension; an example is "CustomScriptExtension". Type *string `json:"type,omitempty"` // Specifies the version of the script handler. TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` // READ-ONLY; The provisioning state, which only appears in the response. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
MachineExtensionProperties - Describes the properties of a Machine Extension.
func (MachineExtensionProperties) MarshalJSON ¶
func (m MachineExtensionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionProperties.
func (*MachineExtensionProperties) UnmarshalJSON ¶
func (m *MachineExtensionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionProperties.
type MachineExtensionPropertiesInstanceView ¶
type MachineExtensionPropertiesInstanceView struct { // Instance view status. Status *MachineExtensionInstanceViewStatus `json:"status,omitempty"` // READ-ONLY; The machine extension name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Specifies the type of the extension; an example is "CustomScriptExtension". Type *string `json:"type,omitempty" azure:"ro"` // READ-ONLY; Specifies the version of the script handler. TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty" azure:"ro"` }
MachineExtensionPropertiesInstanceView - The machine extension instance view.
func (MachineExtensionPropertiesInstanceView) MarshalJSON ¶
func (m MachineExtensionPropertiesInstanceView) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionPropertiesInstanceView.
func (*MachineExtensionPropertiesInstanceView) UnmarshalJSON ¶
func (m *MachineExtensionPropertiesInstanceView) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionPropertiesInstanceView.
type MachineExtensionUpdate ¶
type MachineExtensionUpdate struct { // Describes Machine Extension Update Properties. Properties *MachineExtensionUpdateProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
MachineExtensionUpdate - Describes a Machine Extension Update.
func (MachineExtensionUpdate) MarshalJSON ¶
func (m MachineExtensionUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionUpdate.
func (*MachineExtensionUpdate) UnmarshalJSON ¶
func (m *MachineExtensionUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionUpdate.
type MachineExtensionUpdateProperties ¶
type MachineExtensionUpdateProperties struct { // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, // however, the extension will not upgrade minor versions unless redeployed, even // with this property set to true. AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` // How the extension handler should be forced to update even if the extension configuration has not changed. ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ProtectedSettings interface{} `json:"protectedSettings,omitempty"` // The name of the extension handler publisher. Publisher *string `json:"publisher,omitempty"` // Json formatted public settings for the extension. Settings interface{} `json:"settings,omitempty"` // Specifies the type of the extension; an example is "CustomScriptExtension". Type *string `json:"type,omitempty"` // Specifies the version of the script handler. TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` }
MachineExtensionUpdateProperties - Describes the properties of a Machine Extension.
func (MachineExtensionUpdateProperties) MarshalJSON ¶
func (m MachineExtensionUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionUpdateProperties.
func (*MachineExtensionUpdateProperties) UnmarshalJSON ¶
func (m *MachineExtensionUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionUpdateProperties.
type MachineExtensionsClient ¶
type MachineExtensionsClient struct {
// contains filtered or unexported fields
}
MachineExtensionsClient contains the methods for the MachineExtensions group. Don't use this type directly, use NewMachineExtensionsClient() instead.
func NewMachineExtensionsClient ¶
func NewMachineExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachineExtensionsClient, error)
NewMachineExtensionsClient creates a new instance of MachineExtensionsClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*MachineExtensionsClient) BeginCreateOrUpdate ¶
func (client *MachineExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters MachineExtension, options *MachineExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MachineExtensionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The operation to create or update the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. name - The name of the machine where the extension should be created or updated. extensionName - The name of the machine extension. extensionParameters - Parameters supplied to the Create Machine Extension operation. options - MachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/PUTExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewMachineExtensionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myMachine", "CustomScriptExtension", armconnectedvmware.MachineExtension{ Location: to.Ptr("eastus2euap"), Properties: &armconnectedvmware.MachineExtensionProperties{ Type: to.Ptr("CustomScriptExtension"), Publisher: to.Ptr("Microsoft.Compute"), Settings: map[string]interface{}{ "commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"", }, TypeHandlerVersion: to.Ptr("1.10"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*MachineExtensionsClient) BeginDelete ¶
func (client *MachineExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, extensionName string, options *MachineExtensionsClientBeginDeleteOptions) (*runtime.Poller[MachineExtensionsClientDeleteResponse], error)
BeginDelete - The operation to delete the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. name - The name of the machine where the extension should be deleted. extensionName - The name of the machine extension. options - MachineExtensionsClientBeginDeleteOptions contains the optional parameters for the MachineExtensionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DELETEExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewMachineExtensionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "myResourceGroup", "myMachine", "MMA", 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 (*MachineExtensionsClient) BeginUpdate ¶
func (client *MachineExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters MachineExtensionUpdate, options *MachineExtensionsClientBeginUpdateOptions) (*runtime.Poller[MachineExtensionsClientUpdateResponse], error)
BeginUpdate - The operation to update the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. name - The name of the machine where the extension should be created or updated. extensionName - The name of the machine extension. extensionParameters - Parameters supplied to the Create Machine Extension operation. options - MachineExtensionsClientBeginUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewMachineExtensionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myMachine", "CustomScriptExtension", armconnectedvmware.MachineExtensionUpdate{ Properties: &armconnectedvmware.MachineExtensionUpdateProperties{ Type: to.Ptr("CustomScriptExtension"), Publisher: to.Ptr("Microsoft.Compute"), Settings: map[string]interface{}{ "commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -lt 100 }\"", }, TypeHandlerVersion: to.Ptr("1.10"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*MachineExtensionsClient) Get ¶
func (client *MachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, name string, extensionName string, options *MachineExtensionsClientGetOptions) (MachineExtensionsClientGetResponse, error)
Get - The operation to get the extension. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. name - The name of the machine containing the extension. extensionName - The name of the machine extension. options - MachineExtensionsClientGetOptions contains the optional parameters for the MachineExtensionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GETExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewMachineExtensionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "myResourceGroup", "myMachine", "CustomScriptExtension", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*MachineExtensionsClient) NewListPager ¶
func (client *MachineExtensionsClient) NewListPager(resourceGroupName string, name string, options *MachineExtensionsClientListOptions) *runtime.Pager[MachineExtensionsClientListResponse]
NewListPager - The operation to get all extensions of a non-Azure machine If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. name - The name of the machine containing the extension. options - MachineExtensionsClientListOptions contains the optional parameters for the MachineExtensionsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/LISTExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewMachineExtensionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("myResourceGroup", "myMachine", &armconnectedvmware.MachineExtensionsClientListOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type MachineExtensionsClientBeginCreateOrUpdateOptions ¶
type MachineExtensionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginCreateOrUpdate method.
type MachineExtensionsClientBeginDeleteOptions ¶
type MachineExtensionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MachineExtensionsClientBeginDeleteOptions contains the optional parameters for the MachineExtensionsClient.BeginDelete method.
type MachineExtensionsClientBeginUpdateOptions ¶
type MachineExtensionsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MachineExtensionsClientBeginUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginUpdate method.
type MachineExtensionsClientCreateOrUpdateResponse ¶
type MachineExtensionsClientCreateOrUpdateResponse struct {
MachineExtension
}
MachineExtensionsClientCreateOrUpdateResponse contains the response from method MachineExtensionsClient.CreateOrUpdate.
type MachineExtensionsClientDeleteResponse ¶
type MachineExtensionsClientDeleteResponse struct { }
MachineExtensionsClientDeleteResponse contains the response from method MachineExtensionsClient.Delete.
type MachineExtensionsClientGetOptions ¶
type MachineExtensionsClientGetOptions struct { }
MachineExtensionsClientGetOptions contains the optional parameters for the MachineExtensionsClient.Get method.
type MachineExtensionsClientGetResponse ¶
type MachineExtensionsClientGetResponse struct {
MachineExtension
}
MachineExtensionsClientGetResponse contains the response from method MachineExtensionsClient.Get.
type MachineExtensionsClientListOptions ¶
type MachineExtensionsClientListOptions struct { // The expand expression to apply on the operation. Expand *string }
MachineExtensionsClientListOptions contains the optional parameters for the MachineExtensionsClient.List method.
type MachineExtensionsClientListResponse ¶
type MachineExtensionsClientListResponse struct {
MachineExtensionsListResult
}
MachineExtensionsClientListResponse contains the response from method MachineExtensionsClient.List.
type MachineExtensionsClientUpdateResponse ¶
type MachineExtensionsClientUpdateResponse struct {
MachineExtension
}
MachineExtensionsClientUpdateResponse contains the response from method MachineExtensionsClient.Update.
type MachineExtensionsListResult ¶
type MachineExtensionsListResult struct { // The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. NextLink *string `json:"nextLink,omitempty"` // The list of extensions Value []*MachineExtension `json:"value,omitempty"` }
MachineExtensionsListResult - Describes the Machine Extensions List Result.
func (MachineExtensionsListResult) MarshalJSON ¶
func (m MachineExtensionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineExtensionsListResult.
func (*MachineExtensionsListResult) UnmarshalJSON ¶
func (m *MachineExtensionsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionsListResult.
type NICType ¶
type NICType string
NICType - NIC type
func PossibleNICTypeValues ¶
func PossibleNICTypeValues() []NICType
PossibleNICTypeValues returns the possible values for the NICType const type.
type NetworkInterface ¶
type NetworkInterface struct { // Gets or sets the device key value. DeviceKey *int32 `json:"deviceKey,omitempty"` // Gets or sets the ipsettings. IPSettings *NicIPSettings `json:"ipSettings,omitempty"` // Gets or sets the name of the network interface. Name *string `json:"name,omitempty"` // Gets or sets the ARM Id of the network resource to connect the virtual machine. NetworkID *string `json:"networkId,omitempty"` // NIC type NicType *NICType `json:"nicType,omitempty"` // Gets or sets the power on boot. PowerOnBoot *PowerOnBootOption `json:"powerOnBoot,omitempty"` // READ-ONLY; Gets or sets the nic ip addresses. IPAddresses []*string `json:"ipAddresses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the label of the virtual network in vCenter that the nic is connected to. Label *string `json:"label,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the NIC MAC address. MacAddress *string `json:"macAddress,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name of the virtual network in vCenter that the nic is connected to. NetworkMoName *string `json:"networkMoName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual network that the nic is connected // to. NetworkMoRefID *string `json:"networkMoRefId,omitempty" azure:"ro"` }
NetworkInterface - Network Interface model
func (NetworkInterface) MarshalJSON ¶
func (n NetworkInterface) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterface.
func (*NetworkInterface) UnmarshalJSON ¶
func (n *NetworkInterface) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterface.
type NetworkInterfaceUpdate ¶
type NetworkInterfaceUpdate struct { // Gets or sets the device key value. DeviceKey *int32 `json:"deviceKey,omitempty"` // Gets or sets the name of the network interface. Name *string `json:"name,omitempty"` // Gets or sets the ARM Id of the network resource to connect the virtual machine. NetworkID *string `json:"networkId,omitempty"` // NIC type NicType *NICType `json:"nicType,omitempty"` // Gets or sets the power on boot. PowerOnBoot *PowerOnBootOption `json:"powerOnBoot,omitempty"` }
NetworkInterfaceUpdate - Defines the network interface update.
func (NetworkInterfaceUpdate) MarshalJSON ¶
func (n NetworkInterfaceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceUpdate.
func (*NetworkInterfaceUpdate) UnmarshalJSON ¶
func (n *NetworkInterfaceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceUpdate.
type NetworkProfile ¶
type NetworkProfile struct { // Gets or sets the list of network interfaces associated with the virtual machine. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` }
NetworkProfile - Defines the resource properties.
func (NetworkProfile) MarshalJSON ¶
func (n NetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfile.
func (*NetworkProfile) UnmarshalJSON ¶
func (n *NetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.
type NetworkProfileUpdate ¶
type NetworkProfileUpdate struct { // Gets or sets the list of network interfaces associated with the virtual machine. NetworkInterfaces []*NetworkInterfaceUpdate `json:"networkInterfaces,omitempty"` }
NetworkProfileUpdate - Defines the update resource properties.
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 NicIPAddressSettings ¶
type NicIPAddressSettings struct { // READ-ONLY; Gets the ip address allocation method. AllocationMethod *string `json:"allocationMethod,omitempty" azure:"ro"` // READ-ONLY; Gets the ip address for the nic. IPAddress *string `json:"ipAddress,omitempty" azure:"ro"` // READ-ONLY; Gets the mask. SubnetMask *string `json:"subnetMask,omitempty" azure:"ro"` }
NicIPAddressSettings - IP address information for a virtual network adapter reported by the fabric.
func (NicIPAddressSettings) MarshalJSON ¶
func (n NicIPAddressSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NicIPAddressSettings.
func (*NicIPAddressSettings) UnmarshalJSON ¶
func (n *NicIPAddressSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NicIPAddressSettings.
type NicIPSettings ¶
type NicIPSettings struct { // Gets or sets the nic allocation method. AllocationMethod *IPAddressAllocationMethod `json:"allocationMethod,omitempty"` // Gets or sets the dns servers. DNSServers []*string `json:"dnsServers,omitempty"` // Gets or sets the gateway. Gateway []*string `json:"gateway,omitempty"` // Gets or sets the ip address for the nic. IPAddress *string `json:"ipAddress,omitempty"` // Gets or sets the mask. SubnetMask *string `json:"subnetMask,omitempty"` // READ-ONLY; Gets or sets the IP address information being reported for this NIC. This contains the same IPv4 information // above plus IPV6 information. IPAddressInfo []*NicIPAddressSettings `json:"ipAddressInfo,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the primary server. PrimaryWinsServer *string `json:"primaryWinsServer,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the secondary server. SecondaryWinsServer *string `json:"secondaryWinsServer,omitempty" azure:"ro"` }
NicIPSettings - Defines the network interface ip settings.
func (NicIPSettings) MarshalJSON ¶
func (n NicIPSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NicIPSettings.
func (*NicIPSettings) UnmarshalJSON ¶
func (n *NicIPSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NicIPSettings.
type Operation ¶
type Operation struct { // Properties of the operation Display *OperationDisplay `json:"display,omitempty"` // Indicates whether the operation is data action or not. IsDataAction *bool `json:"isDataAction,omitempty"` // Name of the operation Name *string `json:"name,omitempty"` }
Operation provided by provider
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 { // Description of the operation Description *string `json:"description,omitempty"` // Operation name Operation *string `json:"operation,omitempty"` // Provider name Provider *string `json:"provider,omitempty"` // Resource name Resource *string `json:"resource,omitempty"` }
OperationDisplay - Properties of the operation
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type 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 - Returns list of all operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
OperationsList
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type OperationsList ¶
type OperationsList struct { // REQUIRED; Array of operations Value []*Operation `json:"value,omitempty"` // Url to follow for getting next page of operations. NextLink *string `json:"nextLink,omitempty"` }
OperationsList - Lists the operations available.
func (OperationsList) MarshalJSON ¶
func (o OperationsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationsList.
func (*OperationsList) UnmarshalJSON ¶
func (o *OperationsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationsList.
type OsProfile ¶
type OsProfile struct { // Gets or sets administrator password. AdminPassword *string `json:"adminPassword,omitempty"` // Gets or sets administrator username. AdminUsername *string `json:"adminUsername,omitempty"` // Gets or sets computer name. ComputerName *string `json:"computerName,omitempty"` // Gets or sets the guestId. GuestID *string `json:"guestId,omitempty"` // Specifies the linux configuration for update management. LinuxConfiguration *OsProfileLinuxConfiguration `json:"linuxConfiguration,omitempty"` // Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty"` // Specifies the windows configuration for update management. WindowsConfiguration *OsProfileWindowsConfiguration `json:"windowsConfiguration,omitempty"` // READ-ONLY; Gets or sets a value indicating whether the VM is ready for extension operations. AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty" azure:"ro"` // READ-ONLY; Gets or sets os name. OSName *string `json:"osName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current running status of VMware Tools running in the guest operating system. ToolsRunningStatus *string `json:"toolsRunningStatus,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current version of VMware Tools. ToolsVersion *string `json:"toolsVersion,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system. ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty" azure:"ro"` }
OsProfile - Defines the resource properties.
func (OsProfile) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type OsProfile.
func (*OsProfile) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfile.
type OsProfileLinuxConfiguration ¶
type OsProfileLinuxConfiguration struct { // Specifies the patch settings. PatchSettings *PatchSettings `json:"patchSettings,omitempty"` }
OsProfileLinuxConfiguration - Specifies the linux configuration for update management.
func (OsProfileLinuxConfiguration) MarshalJSON ¶
func (o OsProfileLinuxConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsProfileLinuxConfiguration.
func (*OsProfileLinuxConfiguration) UnmarshalJSON ¶
func (o *OsProfileLinuxConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfileLinuxConfiguration.
type OsProfileUpdate ¶
type OsProfileUpdate struct { // Specifies the linux configuration for update management. LinuxConfiguration *OsProfileUpdateLinuxConfiguration `json:"linuxConfiguration,omitempty"` // Specifies the windows configuration for update management. WindowsConfiguration *OsProfileUpdateWindowsConfiguration `json:"windowsConfiguration,omitempty"` }
OsProfileUpdate - Defines the os update properties.
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 { // Specifies the patch settings. PatchSettings *PatchSettings `json:"patchSettings,omitempty"` }
OsProfileUpdateLinuxConfiguration - Specifies the linux configuration for update management.
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 { // Specifies the patch settings. PatchSettings *PatchSettings `json:"patchSettings,omitempty"` }
OsProfileUpdateWindowsConfiguration - Specifies the windows configuration for update management.
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 OsProfileWindowsConfiguration ¶
type OsProfileWindowsConfiguration struct { // Specifies the patch settings. PatchSettings *PatchSettings `json:"patchSettings,omitempty"` }
OsProfileWindowsConfiguration - Specifies the windows configuration for update management.
func (OsProfileWindowsConfiguration) MarshalJSON ¶
func (o OsProfileWindowsConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsProfileWindowsConfiguration.
func (*OsProfileWindowsConfiguration) UnmarshalJSON ¶
func (o *OsProfileWindowsConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfileWindowsConfiguration.
type OsType ¶
type OsType string
OsType - Defines the different types of VM guest operating systems.
func PossibleOsTypeValues ¶
func PossibleOsTypeValues() []OsType
PossibleOsTypeValues returns the possible values for the OsType const type.
type OsTypeUM ¶
type OsTypeUM string
OsTypeUM - The operating system type of the machine.
func PossibleOsTypeUMValues ¶
func PossibleOsTypeUMValues() []OsTypeUM
PossibleOsTypeUMValues returns the possible values for the OsTypeUM const type.
type PatchOperationStartedBy ¶
type PatchOperationStartedBy string
PatchOperationStartedBy - Indicates if operation was triggered by user or by platform.
const ( PatchOperationStartedByPlatform PatchOperationStartedBy = "Platform" PatchOperationStartedByUser PatchOperationStartedBy = "User" )
func PossiblePatchOperationStartedByValues ¶
func PossiblePatchOperationStartedByValues() []PatchOperationStartedBy
PossiblePatchOperationStartedByValues returns the possible values for the PatchOperationStartedBy const type.
type PatchOperationStatus ¶
type PatchOperationStatus string
PatchOperationStatus - The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings."
const ( PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings" PatchOperationStatusFailed PatchOperationStatus = "Failed" PatchOperationStatusInProgress PatchOperationStatus = "InProgress" PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded" PatchOperationStatusUnknown PatchOperationStatus = "Unknown" )
func PossiblePatchOperationStatusValues ¶
func PossiblePatchOperationStatusValues() []PatchOperationStatus
PossiblePatchOperationStatusValues returns the possible values for the PatchOperationStatus const type.
type PatchServiceUsed ¶
type PatchServiceUsed string
PatchServiceUsed - Specifies the patch service used for the operation.
const ( PatchServiceUsedAPT PatchServiceUsed = "APT" PatchServiceUsedUnknown PatchServiceUsed = "Unknown" PatchServiceUsedWU PatchServiceUsed = "WU" PatchServiceUsedWUWSUS PatchServiceUsed = "WU_WSUS" PatchServiceUsedYUM PatchServiceUsed = "YUM" PatchServiceUsedZypper PatchServiceUsed = "Zypper" )
func PossiblePatchServiceUsedValues ¶
func PossiblePatchServiceUsedValues() []PatchServiceUsed
PossiblePatchServiceUsedValues returns the possible values for the PatchServiceUsed const type.
type PatchSettings ¶
type PatchSettings struct { // Specifies the assessment mode. AssessmentMode *string `json:"assessmentMode,omitempty"` // Specifies the patch mode. PatchMode *string `json:"patchMode,omitempty"` }
PatchSettings - Specifies the patch settings.
func (PatchSettings) MarshalJSON ¶
func (p PatchSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PatchSettings.
func (*PatchSettings) UnmarshalJSON ¶
func (p *PatchSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PatchSettings.
type PlacementProfile ¶
type PlacementProfile struct { // Gets or sets the ARM Id of the cluster resource on which this virtual machine will deploy. ClusterID *string `json:"clusterId,omitempty"` // Gets or sets the ARM Id of the datastore resource on which the data for the virtual machine will be kept. DatastoreID *string `json:"datastoreId,omitempty"` // Gets or sets the ARM Id of the host resource on which this virtual machine will deploy. HostID *string `json:"hostId,omitempty"` // Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. ResourcePoolID *string `json:"resourcePoolId,omitempty"` }
PlacementProfile - Defines the resource properties.
func (PlacementProfile) MarshalJSON ¶
func (p PlacementProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PlacementProfile.
func (*PlacementProfile) UnmarshalJSON ¶
func (p *PlacementProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PlacementProfile.
type PowerOnBootOption ¶
type PowerOnBootOption string
PowerOnBootOption - Defines the options for power on boot.
const ( PowerOnBootOptionDisabled PowerOnBootOption = "disabled" PowerOnBootOptionEnabled PowerOnBootOption = "enabled" )
func PossiblePowerOnBootOptionValues ¶
func PossiblePowerOnBootOptionValues() []PowerOnBootOption
PossiblePowerOnBootOptionValues returns the possible values for the PowerOnBootOption 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 ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The current deployment state of resource.
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreated ProvisioningState = "Created" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateProvisioning ProvisioningState = "Provisioning" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourcePatch ¶
ResourcePatch - Object containing updates for patch operations.
func (ResourcePatch) MarshalJSON ¶
func (r ResourcePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePatch.
func (*ResourcePatch) UnmarshalJSON ¶
func (r *ResourcePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePatch.
type ResourcePool ¶
type ResourcePool struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *ResourcePoolProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
ResourcePool - Define the resourcePool.
func (ResourcePool) MarshalJSON ¶
func (r ResourcePool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePool.
func (*ResourcePool) UnmarshalJSON ¶
func (r *ResourcePool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePool.
type ResourcePoolInventoryItem ¶
type ResourcePoolInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // Parent resourcePool inventory resource details. Parent *InventoryItemDetails `json:"parent,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
ResourcePoolInventoryItem - The resource pool inventory item.
func (*ResourcePoolInventoryItem) GetInventoryItemProperties ¶
func (r *ResourcePoolInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type ResourcePoolInventoryItem.
func (ResourcePoolInventoryItem) MarshalJSON ¶
func (r ResourcePoolInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePoolInventoryItem.
func (*ResourcePoolInventoryItem) UnmarshalJSON ¶
func (r *ResourcePoolInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolInventoryItem.
type ResourcePoolProperties ¶
type ResourcePoolProperties struct { // Gets or sets the inventory Item ID for the resource pool. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the resource pool. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this resource pool resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets or sets CPULimitMHz which specifies a CPU usage limit in MHz. Utilization will not exceed this limit even // if there are available resources. CPULimitMHz *int64 `json:"cpuLimitMHz,omitempty" azure:"ro"` // READ-ONLY; Gets or sets CPUReservationMHz which specifies the CPU size in MHz that is guaranteed to be available. CPUReservationMHz *int64 `json:"cpuReservationMHz,omitempty" azure:"ro"` // relative allocation between resource consumers. CPUSharesLevel *string `json:"cpuSharesLevel,omitempty" azure:"ro"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets MemLimitMB specifies a memory usage limit in megabytes. Utilization will not exceed the specified // limit even if there are available resources. MemLimitMB *int64 `json:"memLimitMB,omitempty" azure:"ro"` // READ-ONLY; Gets or sets MemReservationMB which specifies the guaranteed available memory in megabytes. MemReservationMB *int64 `json:"memReservationMB,omitempty" azure:"ro"` // in relative allocation between resource consumers. MemSharesLevel *string `json:"memSharesLevel,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the resource pool. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
ResourcePoolProperties - Defines the resource properties.
func (ResourcePoolProperties) MarshalJSON ¶
func (r ResourcePoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePoolProperties.
func (*ResourcePoolProperties) UnmarshalJSON ¶
func (r *ResourcePoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolProperties.
type ResourcePoolsClient ¶
type ResourcePoolsClient struct {
// contains filtered or unexported fields
}
ResourcePoolsClient contains the methods for the ResourcePools group. Don't use this type directly, use NewResourcePoolsClient() instead.
func NewResourcePoolsClient ¶
func NewResourcePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourcePoolsClient, error)
NewResourcePoolsClient creates a new instance of ResourcePoolsClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ResourcePoolsClient) BeginCreate ¶
func (client *ResourcePoolsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourcePoolName string, body ResourcePool, options *ResourcePoolsClientBeginCreateOptions) (*runtime.Poller[ResourcePoolsClientCreateResponse], error)
BeginCreate - Create Or Update resourcePool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. resourcePoolName - Name of the resourcePool. body - Request payload. options - ResourcePoolsClientBeginCreateOptions contains the optional parameters for the ResourcePoolsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateResourcePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewResourcePoolsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "HRPool", armconnectedvmware.ResourcePool{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.ResourcePoolProperties{ MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*ResourcePoolsClient) BeginDelete ¶
func (client *ResourcePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourcePoolName string, options *ResourcePoolsClientBeginDeleteOptions) (*runtime.Poller[ResourcePoolsClientDeleteResponse], error)
BeginDelete - Implements resourcePool DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. resourcePoolName - Name of the resourcePool. options - ResourcePoolsClientBeginDeleteOptions contains the optional parameters for the ResourcePoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteResourcePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewResourcePoolsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRPool", &armconnectedvmware.ResourcePoolsClientBeginDeleteOptions{Force: 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 (*ResourcePoolsClient) Get ¶
func (client *ResourcePoolsClient) Get(ctx context.Context, resourceGroupName string, resourcePoolName string, options *ResourcePoolsClientGetOptions) (ResourcePoolsClientGetResponse, error)
Get - Implements resourcePool GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. resourcePoolName - Name of the resourcePool. options - ResourcePoolsClientGetOptions contains the optional parameters for the ResourcePoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetResourcePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewResourcePoolsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRPool", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ResourcePoolsClient) NewListByResourceGroupPager ¶
func (client *ResourcePoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *ResourcePoolsClientListByResourceGroupOptions) *runtime.Pager[ResourcePoolsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of resourcePools in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - ResourcePoolsClientListByResourceGroupOptions contains the optional parameters for the ResourcePoolsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePoolsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewResourcePoolsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ResourcePoolsClient) NewListPager ¶
func (client *ResourcePoolsClient) NewListPager(options *ResourcePoolsClientListOptions) *runtime.Pager[ResourcePoolsClientListResponse]
NewListPager - List of resourcePools in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - ResourcePoolsClientListOptions contains the optional parameters for the ResourcePoolsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListResourcePools.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewResourcePoolsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ResourcePoolsClient) Update ¶
func (client *ResourcePoolsClient) Update(ctx context.Context, resourceGroupName string, resourcePoolName string, body ResourcePatch, options *ResourcePoolsClientUpdateOptions) (ResourcePoolsClientUpdateResponse, error)
Update - API to update certain properties of the resourcePool resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. resourcePoolName - Name of the resourcePool. body - Resource properties to update. options - ResourcePoolsClientUpdateOptions contains the optional parameters for the ResourcePoolsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateResourcePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewResourcePoolsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "HRPool", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ResourcePoolsClientBeginCreateOptions ¶
type ResourcePoolsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ResourcePoolsClientBeginCreateOptions contains the optional parameters for the ResourcePoolsClient.BeginCreate method.
type ResourcePoolsClientBeginDeleteOptions ¶
type ResourcePoolsClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
ResourcePoolsClientBeginDeleteOptions contains the optional parameters for the ResourcePoolsClient.BeginDelete method.
type ResourcePoolsClientCreateResponse ¶
type ResourcePoolsClientCreateResponse struct {
ResourcePool
}
ResourcePoolsClientCreateResponse contains the response from method ResourcePoolsClient.Create.
type ResourcePoolsClientDeleteResponse ¶
type ResourcePoolsClientDeleteResponse struct { }
ResourcePoolsClientDeleteResponse contains the response from method ResourcePoolsClient.Delete.
type ResourcePoolsClientGetOptions ¶
type ResourcePoolsClientGetOptions struct { }
ResourcePoolsClientGetOptions contains the optional parameters for the ResourcePoolsClient.Get method.
type ResourcePoolsClientGetResponse ¶
type ResourcePoolsClientGetResponse struct {
ResourcePool
}
ResourcePoolsClientGetResponse contains the response from method ResourcePoolsClient.Get.
type ResourcePoolsClientListByResourceGroupOptions ¶
type ResourcePoolsClientListByResourceGroupOptions struct { }
ResourcePoolsClientListByResourceGroupOptions contains the optional parameters for the ResourcePoolsClient.ListByResourceGroup method.
type ResourcePoolsClientListByResourceGroupResponse ¶
type ResourcePoolsClientListByResourceGroupResponse struct {
ResourcePoolsList
}
ResourcePoolsClientListByResourceGroupResponse contains the response from method ResourcePoolsClient.ListByResourceGroup.
type ResourcePoolsClientListOptions ¶
type ResourcePoolsClientListOptions struct { }
ResourcePoolsClientListOptions contains the optional parameters for the ResourcePoolsClient.List method.
type ResourcePoolsClientListResponse ¶
type ResourcePoolsClientListResponse struct {
ResourcePoolsList
}
ResourcePoolsClientListResponse contains the response from method ResourcePoolsClient.List.
type ResourcePoolsClientUpdateOptions ¶
type ResourcePoolsClientUpdateOptions struct { }
ResourcePoolsClientUpdateOptions contains the optional parameters for the ResourcePoolsClient.Update method.
type ResourcePoolsClientUpdateResponse ¶
type ResourcePoolsClientUpdateResponse struct {
ResourcePool
}
ResourcePoolsClientUpdateResponse contains the response from method ResourcePoolsClient.Update.
type ResourcePoolsList ¶
type ResourcePoolsList struct { // REQUIRED; Array of ResourcePools Value []*ResourcePool `json:"value,omitempty"` // Url to follow for getting next page of ResourcePools. NextLink *string `json:"nextLink,omitempty"` }
ResourcePoolsList - List of ResourcePools.
func (ResourcePoolsList) MarshalJSON ¶
func (r ResourcePoolsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePoolsList.
func (*ResourcePoolsList) UnmarshalJSON ¶
func (r *ResourcePoolsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolsList.
type ResourceStatus ¶
type ResourceStatus struct { // READ-ONLY; The last update time for this condition. LastUpdatedAt *time.Time `json:"lastUpdatedAt,omitempty" azure:"ro"` // READ-ONLY; A human readable message indicating details about the status. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The reason for the condition's status. Reason *string `json:"reason,omitempty" azure:"ro"` // READ-ONLY; Severity with which to treat failures of this type of condition. Severity *string `json:"severity,omitempty" azure:"ro"` // READ-ONLY; Status of the condition. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The type of the condition. Type *string `json:"type,omitempty" azure:"ro"` }
ResourceStatus - The resource status information.
func (ResourceStatus) MarshalJSON ¶
func (r ResourceStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceStatus.
func (*ResourceStatus) UnmarshalJSON ¶
func (r *ResourceStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceStatus.
type SCSIControllerType ¶
type SCSIControllerType string
SCSIControllerType - Defines the different types of SCSI controllers.
const ( SCSIControllerTypeBuslogic SCSIControllerType = "buslogic" SCSIControllerTypeLsilogic SCSIControllerType = "lsilogic" SCSIControllerTypeLsilogicsas SCSIControllerType = "lsilogicsas" SCSIControllerTypePvscsi SCSIControllerType = "pvscsi" )
func PossibleSCSIControllerTypeValues ¶
func PossibleSCSIControllerTypeValues() []SCSIControllerType
PossibleSCSIControllerTypeValues returns the possible values for the SCSIControllerType const type.
type SecurityProfile ¶
type SecurityProfile struct { // Specifies the security settings like secure boot used while creating the virtual machine. UefiSettings *UefiSettings `json:"uefiSettings,omitempty"` }
SecurityProfile - Specifies the Security profile settings for the virtual machine.
func (SecurityProfile) MarshalJSON ¶
func (s SecurityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityProfile.
func (*SecurityProfile) UnmarshalJSON ¶
func (s *SecurityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile.
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 status of the hybrid machine agent.
const ( StatusTypesConnected StatusTypes = "Connected" StatusTypesDisconnected StatusTypes = "Disconnected" StatusTypesError StatusTypes = "Error" )
func PossibleStatusTypesValues ¶
func PossibleStatusTypesValues() []StatusTypes
PossibleStatusTypesValues returns the possible values for the StatusTypes const type.
type StopVirtualMachineOptions ¶
type StopVirtualMachineOptions struct { // Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful // shutdown whereas false indicates otherwise. Defaults to false. SkipShutdown *bool `json:"skipShutdown,omitempty"` }
StopVirtualMachineOptions - Defines the stop action properties.
func (StopVirtualMachineOptions) MarshalJSON ¶
func (s StopVirtualMachineOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StopVirtualMachineOptions.
func (*StopVirtualMachineOptions) UnmarshalJSON ¶
func (s *StopVirtualMachineOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StopVirtualMachineOptions.
type StorageProfile ¶
type StorageProfile struct { // Gets or sets the list of virtual disks associated with the virtual machine. Disks []*VirtualDisk `json:"disks,omitempty"` // READ-ONLY; Gets or sets the list of virtual SCSI controllers associated with the virtual machine. ScsiControllers []*VirtualSCSIController `json:"scsiControllers,omitempty" azure:"ro"` }
StorageProfile - Defines the resource properties.
func (StorageProfile) MarshalJSON ¶
func (s StorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfile.
func (*StorageProfile) UnmarshalJSON ¶
func (s *StorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.
type StorageProfileUpdate ¶
type StorageProfileUpdate struct { // Gets or sets the list of virtual disks associated with the virtual machine. Disks []*VirtualDiskUpdate `json:"disks,omitempty"` }
StorageProfileUpdate - Defines the resource update properties.
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 SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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 UefiSettings ¶
type UefiSettings struct { // Specifies whether secure boot should be enabled on the virtual machine. SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"` }
UefiSettings - Specifies the security settings like secure boot used while creating the virtual machine.
func (UefiSettings) MarshalJSON ¶
func (u UefiSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UefiSettings.
func (*UefiSettings) UnmarshalJSON ¶
func (u *UefiSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UefiSettings.
type VCenter ¶
type VCenter struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VCenterProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
VCenter - Defines the vCenter.
func (VCenter) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type VCenter.
func (*VCenter) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type VCenter.
type VCenterProperties ¶
type VCenterProperties struct { // REQUIRED; Gets or sets the FQDN/IPAddress of the vCenter. Fqdn *string `json:"fqdn,omitempty"` // Username / Password Credentials to connect to vcenter. Credentials *VICredential `json:"credentials,omitempty"` // Gets or sets the port of the vCenter. Port *int32 `json:"port,omitempty"` // READ-ONLY; Gets or sets the connection status to the vCenter. ConnectionStatus *string `json:"connectionStatus,omitempty" azure:"ro"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the instance UUID of the vCenter. InstanceUUID *string `json:"instanceUuid,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the version of the vCenter. Version *string `json:"version,omitempty" azure:"ro"` }
VCenterProperties - Defines the resource properties.
func (VCenterProperties) MarshalJSON ¶
func (v VCenterProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VCenterProperties.
func (*VCenterProperties) UnmarshalJSON ¶
func (v *VCenterProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VCenterProperties.
type VCentersClient ¶
type VCentersClient struct {
// contains filtered or unexported fields
}
VCentersClient contains the methods for the VCenters group. Don't use this type directly, use NewVCentersClient() instead.
func NewVCentersClient ¶
func NewVCentersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VCentersClient, error)
NewVCentersClient creates a new instance of VCentersClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VCentersClient) BeginCreate ¶
func (client *VCentersClient) BeginCreate(ctx context.Context, resourceGroupName string, vcenterName string, body VCenter, options *VCentersClientBeginCreateOptions) (*runtime.Poller[VCentersClientCreateResponse], error)
BeginCreate - Create Or Update vCenter. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. body - Request payload. options - VCentersClientBeginCreateOptions contains the optional parameters for the VCentersClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVCenter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVCentersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "ContosoVCenter", armconnectedvmware.VCenter{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.VCenterProperties{ Credentials: &armconnectedvmware.VICredential{ Password: to.Ptr("<password>"), Username: to.Ptr("tempuser"), }, Fqdn: to.Ptr("ContosoVMware.contoso.com"), Port: to.Ptr[int32](1234), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VCentersClient) BeginDelete ¶
func (client *VCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, vcenterName string, options *VCentersClientBeginDeleteOptions) (*runtime.Poller[VCentersClientDeleteResponse], error)
BeginDelete - Implements vCenter DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. options - VCentersClientBeginDeleteOptions contains the optional parameters for the VCentersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVCenter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVCentersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "ContosoVCenter", &armconnectedvmware.VCentersClientBeginDeleteOptions{Force: 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 (*VCentersClient) Get ¶
func (client *VCentersClient) Get(ctx context.Context, resourceGroupName string, vcenterName string, options *VCentersClientGetOptions) (VCentersClientGetResponse, error)
Get - Implements vCenter GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. options - VCentersClientGetOptions contains the optional parameters for the VCentersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVCenter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVCentersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ContosoVCenter", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VCentersClient) NewListByResourceGroupPager ¶
func (client *VCentersClient) NewListByResourceGroupPager(resourceGroupName string, options *VCentersClientListByResourceGroupOptions) *runtime.Pager[VCentersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of vCenters in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - VCentersClientListByResourceGroupOptions contains the optional parameters for the VCentersClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCentersByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVCentersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VCentersClient) NewListPager ¶
func (client *VCentersClient) NewListPager(options *VCentersClientListOptions) *runtime.Pager[VCentersClientListResponse]
NewListPager - List of vCenters in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - VCentersClientListOptions contains the optional parameters for the VCentersClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVCenters.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVCentersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VCentersClient) Update ¶
func (client *VCentersClient) Update(ctx context.Context, resourceGroupName string, vcenterName string, body ResourcePatch, options *VCentersClientUpdateOptions) (VCentersClientUpdateResponse, error)
Update - API to update certain properties of the vCenter resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. vcenterName - Name of the vCenter. body - Resource properties to update. options - VCentersClientUpdateOptions contains the optional parameters for the VCentersClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVCenter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVCentersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "ContosoVCenter", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type VCentersClientBeginCreateOptions ¶
type VCentersClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VCentersClientBeginCreateOptions contains the optional parameters for the VCentersClient.BeginCreate method.
type VCentersClientBeginDeleteOptions ¶
type VCentersClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
VCentersClientBeginDeleteOptions contains the optional parameters for the VCentersClient.BeginDelete method.
type VCentersClientCreateResponse ¶
type VCentersClientCreateResponse struct {
VCenter
}
VCentersClientCreateResponse contains the response from method VCentersClient.Create.
type VCentersClientDeleteResponse ¶
type VCentersClientDeleteResponse struct { }
VCentersClientDeleteResponse contains the response from method VCentersClient.Delete.
type VCentersClientGetOptions ¶
type VCentersClientGetOptions struct { }
VCentersClientGetOptions contains the optional parameters for the VCentersClient.Get method.
type VCentersClientGetResponse ¶
type VCentersClientGetResponse struct {
VCenter
}
VCentersClientGetResponse contains the response from method VCentersClient.Get.
type VCentersClientListByResourceGroupOptions ¶
type VCentersClientListByResourceGroupOptions struct { }
VCentersClientListByResourceGroupOptions contains the optional parameters for the VCentersClient.ListByResourceGroup method.
type VCentersClientListByResourceGroupResponse ¶
type VCentersClientListByResourceGroupResponse struct {
VCentersList
}
VCentersClientListByResourceGroupResponse contains the response from method VCentersClient.ListByResourceGroup.
type VCentersClientListOptions ¶
type VCentersClientListOptions struct { }
VCentersClientListOptions contains the optional parameters for the VCentersClient.List method.
type VCentersClientListResponse ¶
type VCentersClientListResponse struct {
VCentersList
}
VCentersClientListResponse contains the response from method VCentersClient.List.
type VCentersClientUpdateOptions ¶
type VCentersClientUpdateOptions struct { }
VCentersClientUpdateOptions contains the optional parameters for the VCentersClient.Update method.
type VCentersClientUpdateResponse ¶
type VCentersClientUpdateResponse struct {
VCenter
}
VCentersClientUpdateResponse contains the response from method VCentersClient.Update.
type VCentersList ¶
type VCentersList struct { // REQUIRED; Array of VCenters Value []*VCenter `json:"value,omitempty"` // Url to follow for getting next page of VCenters. NextLink *string `json:"nextLink,omitempty"` }
VCentersList - List of VCenters.
func (VCentersList) MarshalJSON ¶
func (v VCentersList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VCentersList.
func (*VCentersList) UnmarshalJSON ¶
func (v *VCentersList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VCentersList.
type VICredential ¶
type VICredential struct { // Gets or sets the password to connect with the vCenter. Password *string `json:"password,omitempty"` // Gets or sets username to connect with the vCenter. Username *string `json:"username,omitempty"` }
VICredential - Username / Password Credentials to connect to vcenter.
func (VICredential) MarshalJSON ¶
func (v VICredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VICredential.
func (*VICredential) UnmarshalJSON ¶
func (v *VICredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VICredential.
type VMGuestPatchClassificationLinux ¶
type VMGuestPatchClassificationLinux string
const ( VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical" VMGuestPatchClassificationLinuxOther VMGuestPatchClassificationLinux = "Other" VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security" )
func PossibleVMGuestPatchClassificationLinuxValues ¶
func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux
PossibleVMGuestPatchClassificationLinuxValues returns the possible values for the VMGuestPatchClassificationLinux const type.
type VMGuestPatchClassificationWindows ¶
type VMGuestPatchClassificationWindows string
const ( VMGuestPatchClassificationWindowsCritical VMGuestPatchClassificationWindows = "Critical" VMGuestPatchClassificationWindowsDefinition VMGuestPatchClassificationWindows = "Definition" VMGuestPatchClassificationWindowsFeaturePack VMGuestPatchClassificationWindows = "FeaturePack" VMGuestPatchClassificationWindowsSecurity VMGuestPatchClassificationWindows = "Security" VMGuestPatchClassificationWindowsServicePack VMGuestPatchClassificationWindows = "ServicePack" VMGuestPatchClassificationWindowsTools VMGuestPatchClassificationWindows = "Tools" VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp" VMGuestPatchClassificationWindowsUpdates VMGuestPatchClassificationWindows = "Updates" )
func PossibleVMGuestPatchClassificationWindowsValues ¶
func PossibleVMGuestPatchClassificationWindowsValues() []VMGuestPatchClassificationWindows
PossibleVMGuestPatchClassificationWindowsValues returns the possible values for the VMGuestPatchClassificationWindows const type.
type VMGuestPatchRebootSetting ¶
type VMGuestPatchRebootSetting string
VMGuestPatchRebootSetting - Defines when it is acceptable to reboot a VM during a software update operation.
const ( VMGuestPatchRebootSettingAlways VMGuestPatchRebootSetting = "Always" VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired" VMGuestPatchRebootSettingNever VMGuestPatchRebootSetting = "Never" )
func PossibleVMGuestPatchRebootSettingValues ¶
func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting
PossibleVMGuestPatchRebootSettingValues returns the possible values for the VMGuestPatchRebootSetting const type.
type VMGuestPatchRebootStatus ¶
type VMGuestPatchRebootStatus string
VMGuestPatchRebootStatus - The reboot state of the VM following completion of the operation.
const ( VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed" VMGuestPatchRebootStatusFailed VMGuestPatchRebootStatus = "Failed" VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded" VMGuestPatchRebootStatusRequired VMGuestPatchRebootStatus = "Required" VMGuestPatchRebootStatusStarted VMGuestPatchRebootStatus = "Started" VMGuestPatchRebootStatusUnknown VMGuestPatchRebootStatus = "Unknown" )
func PossibleVMGuestPatchRebootStatusValues ¶
func PossibleVMGuestPatchRebootStatusValues() []VMGuestPatchRebootStatus
PossibleVMGuestPatchRebootStatusValues returns the possible values for the VMGuestPatchRebootStatus const type.
type VirtualDisk ¶
type VirtualDisk struct { // Gets or sets the controller id. ControllerKey *int32 `json:"controllerKey,omitempty"` // Gets or sets the device key value. DeviceKey *int32 `json:"deviceKey,omitempty"` // Gets or sets the device name. DeviceName *string `json:"deviceName,omitempty"` // Gets or sets the disk mode. DiskMode *DiskMode `json:"diskMode,omitempty"` // Gets or sets the disk total size. DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // Gets or sets the disk backing type. DiskType *DiskType `json:"diskType,omitempty"` // Gets or sets the name of the virtual disk. Name *string `json:"name,omitempty"` // Gets or sets the unit number of the disk on the controller. UnitNumber *int32 `json:"unitNumber,omitempty"` // READ-ONLY; Gets or sets the disk object id. DiskObjectID *string `json:"diskObjectId,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the label of the virtual disk in vCenter. Label *string `json:"label,omitempty" azure:"ro"` }
VirtualDisk - Virtual disk model
func (VirtualDisk) MarshalJSON ¶
func (v VirtualDisk) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualDisk.
func (*VirtualDisk) UnmarshalJSON ¶
func (v *VirtualDisk) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDisk.
type VirtualDiskUpdate ¶
type VirtualDiskUpdate struct { // Gets or sets the controller id. ControllerKey *int32 `json:"controllerKey,omitempty"` // Gets or sets the device key value. DeviceKey *int32 `json:"deviceKey,omitempty"` // Gets or sets the device name. DeviceName *string `json:"deviceName,omitempty"` // Gets or sets the disk mode. DiskMode *DiskMode `json:"diskMode,omitempty"` // Gets or sets the disk total size. DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // Gets or sets the disk backing type. DiskType *DiskType `json:"diskType,omitempty"` // Gets or sets the name of the virtual disk. Name *string `json:"name,omitempty"` // Gets or sets the unit number of the disk on the controller. UnitNumber *int32 `json:"unitNumber,omitempty"` }
VirtualDiskUpdate - Defines the virtual disk update.
func (VirtualDiskUpdate) MarshalJSON ¶
func (v VirtualDiskUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualDiskUpdate.
func (*VirtualDiskUpdate) UnmarshalJSON ¶
func (v *VirtualDiskUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDiskUpdate.
type VirtualMachine ¶
type VirtualMachine struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VirtualMachineProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // The identity of the resource. Identity *Identity `json:"identity,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
VirtualMachine - Define the virtualMachine.
func (VirtualMachine) MarshalJSON ¶
func (v VirtualMachine) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachine.
func (*VirtualMachine) UnmarshalJSON ¶
func (v *VirtualMachine) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine.
type VirtualMachineAssessPatchesResult ¶
type VirtualMachineAssessPatchesResult struct { // Summarization of patches available for installation on the machine by classification. AvailablePatchCountByClassification *AvailablePatchCountByClassification `json:"availablePatchCountByClassification,omitempty"` // READ-ONLY; The activity ID of the operation that produced this result. AssessmentActivityID *string `json:"assessmentActivityId,omitempty" azure:"ro"` // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. ErrorDetails *ErrorDetail `json:"errorDetails,omitempty" azure:"ro"` // READ-ONLY; The UTC timestamp when the operation finished. LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" azure:"ro"` // READ-ONLY; The operating system type of the machine. OSType *OsTypeUM `json:"osType,omitempty" azure:"ro"` // READ-ONLY; Specifies the patch service used for the operation. PatchServiceUsed *PatchServiceUsed `json:"patchServiceUsed,omitempty" azure:"ro"` // READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete // installation but the reboot has not yet occurred. RebootPending *bool `json:"rebootPending,omitempty" azure:"ro"` // READ-ONLY; The UTC timestamp when the operation began. StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` // READ-ONLY; Indicates if operation was triggered by user or by platform. StartedBy *PatchOperationStartedBy `json:"startedBy,omitempty" azure:"ro"` // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. // At that point it will become "Unknown", "Failed", "Succeeded", or // "CompletedWithWarnings." Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"` }
VirtualMachineAssessPatchesResult - Describes the properties of an AssessPatches result.
func (VirtualMachineAssessPatchesResult) MarshalJSON ¶
func (v VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineAssessPatchesResult.
func (*VirtualMachineAssessPatchesResult) UnmarshalJSON ¶
func (v *VirtualMachineAssessPatchesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineAssessPatchesResult.
type VirtualMachineInstallPatchesParameters ¶
type VirtualMachineInstallPatchesParameters struct { // REQUIRED; Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string // such as PT4H (4 hours) MaximumDuration *string `json:"maximumDuration,omitempty"` // REQUIRED; Defines when it is acceptable to reboot a VM during a software update operation. RebootSetting *VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"` // Input for InstallPatches on a Linux VM, as directly received by the API LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"` // Input for InstallPatches on a Windows VM, as directly received by the API WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"` }
VirtualMachineInstallPatchesParameters - Input for InstallPatches as directly received by the API
func (VirtualMachineInstallPatchesParameters) MarshalJSON ¶
func (v VirtualMachineInstallPatchesParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstallPatchesParameters.
func (*VirtualMachineInstallPatchesParameters) UnmarshalJSON ¶
func (v *VirtualMachineInstallPatchesParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstallPatchesParameters.
type VirtualMachineInstallPatchesResult ¶
type VirtualMachineInstallPatchesResult struct { // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. ErrorDetails *ErrorDetail `json:"errorDetails,omitempty" azure:"ro"` // READ-ONLY; The number of patches that were not installed due to the user blocking their installation. ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty" azure:"ro"` // READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details. FailedPatchCount *int32 `json:"failedPatchCount,omitempty" azure:"ro"` // READ-ONLY; The activity ID of the operation that produced this result. InstallationActivityID *string `json:"installationActivityId,omitempty" azure:"ro"` // READ-ONLY; The number of patches successfully installed. InstalledPatchCount *int32 `json:"installedPatchCount,omitempty" azure:"ro"` // READ-ONLY; The UTC timestamp when the operation finished. LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" azure:"ro"` // READ-ONLY; Whether the operation ran out of time before it completed all its intended actions. MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty" azure:"ro"` // READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria. NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty" azure:"ro"` // READ-ONLY; The operating system type of the machine. OSType *OsTypeUM `json:"osType,omitempty" azure:"ro"` // READ-ONLY; Specifies the patch service used for the operation. PatchServiceUsed *PatchServiceUsed `json:"patchServiceUsed,omitempty" azure:"ro"` // READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed. // Typically this happens when maintenanceWindowExceeded == true. PendingPatchCount *int32 `json:"pendingPatchCount,omitempty" azure:"ro"` // READ-ONLY; The reboot state of the VM following completion of the operation. RebootStatus *VMGuestPatchRebootStatus `json:"rebootStatus,omitempty" azure:"ro"` // READ-ONLY; The UTC timestamp when the operation began. StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` // READ-ONLY; Indicates if operation was triggered by user or by platform. StartedBy *PatchOperationStartedBy `json:"startedBy,omitempty" azure:"ro"` // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. // At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"` }
VirtualMachineInstallPatchesResult - The result summary of an installation operation.
func (VirtualMachineInstallPatchesResult) MarshalJSON ¶
func (v VirtualMachineInstallPatchesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstallPatchesResult.
func (*VirtualMachineInstallPatchesResult) UnmarshalJSON ¶
func (v *VirtualMachineInstallPatchesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstallPatchesResult.
type VirtualMachineInventoryItem ¶
type VirtualMachineInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the folder path of the vm. FolderPath *string `json:"folderPath,omitempty"` // Host inventory resource details. Host *InventoryItemDetails `json:"host,omitempty"` // Gets or sets the nic ip addresses. IPAddresses []*string `json:"ipAddresses,omitempty"` // Gets or sets the instance uuid of the vm. InstanceUUID *string `json:"instanceUuid,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets os name. OSName *string `json:"osName,omitempty"` // Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty"` // ResourcePool inventory resource details. ResourcePool *InventoryItemDetails `json:"resourcePool,omitempty"` // Gets or sets the SMBIOS UUID of the vm. SmbiosUUID *string `json:"smbiosUuid,omitempty"` // READ-ONLY; Gets the power state of the virtual machine. PowerState *string `json:"powerState,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current running status of VMware Tools running in the guest operating system. ToolsRunningStatus *string `json:"toolsRunningStatus,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current version of VMware Tools. ToolsVersion *string `json:"toolsVersion,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system. ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty" azure:"ro"` }
VirtualMachineInventoryItem - The VM inventory item.
func (*VirtualMachineInventoryItem) GetInventoryItemProperties ¶
func (v *VirtualMachineInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualMachineInventoryItem.
func (VirtualMachineInventoryItem) MarshalJSON ¶
func (v VirtualMachineInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInventoryItem.
func (*VirtualMachineInventoryItem) UnmarshalJSON ¶
func (v *VirtualMachineInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInventoryItem.
type VirtualMachineProperties ¶
type VirtualMachineProperties struct { // Firmware type FirmwareType *FirmwareType `json:"firmwareType,omitempty"` // Guest agent status properties. GuestAgentProfile *GuestAgentProfile `json:"guestAgentProfile,omitempty"` // Hardware properties. HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` // Gets or sets the inventory Item ID for the virtual machine. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. MoRefID *string `json:"moRefId,omitempty"` // Network properties. NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` // OS properties. OSProfile *OsProfile `json:"osProfile,omitempty"` // Placement properties. PlacementProfile *PlacementProfile `json:"placementProfile,omitempty"` // Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. ResourcePoolID *string `json:"resourcePoolId,omitempty"` // Gets the security profile. SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` // Gets or sets the SMBIOS UUID of the vm. SmbiosUUID *string `json:"smbiosUuid,omitempty"` // Storage properties. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // Gets or sets the ARM Id of the template resource to deploy the virtual machine. TemplateID *string `json:"templateId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this resource pool resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the folder path of the vm. FolderPath *string `json:"folderPath,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the instance uuid of the vm. InstanceUUID *string `json:"instanceUuid,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the virtual machine. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Gets the power state of the virtual machine. PowerState *string `json:"powerState,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for the vm resource. VMID *string `json:"vmId,omitempty" azure:"ro"` }
VirtualMachineProperties - Defines the resource properties.
func (VirtualMachineProperties) MarshalJSON ¶
func (v VirtualMachineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.
func (*VirtualMachineProperties) UnmarshalJSON ¶
func (v *VirtualMachineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProperties.
type VirtualMachineTemplate ¶
type VirtualMachineTemplate struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VirtualMachineTemplateProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
VirtualMachineTemplate - Define the virtualMachineTemplate.
func (VirtualMachineTemplate) MarshalJSON ¶
func (v VirtualMachineTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplate.
func (*VirtualMachineTemplate) UnmarshalJSON ¶
func (v *VirtualMachineTemplate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplate.
type VirtualMachineTemplateInventoryItem ¶
type VirtualMachineTemplateInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the folder path of the template. FolderPath *string `json:"folderPath,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets memory size in MBs for the template. MemorySizeMB *int32 `json:"memorySizeMB,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the number of vCPUs for the template. NumCPUs *int32 `json:"numCPUs,omitempty"` // Gets or sets the number of cores per socket for the template. Defaults to 1 if unspecified. NumCoresPerSocket *int32 `json:"numCoresPerSocket,omitempty"` // Gets or sets os name. OSName *string `json:"osName,omitempty"` // Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
VirtualMachineTemplateInventoryItem - The VM Template inventory item.
func (*VirtualMachineTemplateInventoryItem) GetInventoryItemProperties ¶
func (v *VirtualMachineTemplateInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualMachineTemplateInventoryItem.
func (VirtualMachineTemplateInventoryItem) MarshalJSON ¶
func (v VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateInventoryItem.
func (*VirtualMachineTemplateInventoryItem) UnmarshalJSON ¶
func (v *VirtualMachineTemplateInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateInventoryItem.
type VirtualMachineTemplateProperties ¶
type VirtualMachineTemplateProperties struct { // Gets or sets the inventory Item ID for the virtual machine template. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine template. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this template resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the disks the template. Disks []*VirtualDisk `json:"disks,omitempty" azure:"ro"` // READ-ONLY; Firmware type FirmwareType *FirmwareType `json:"firmwareType,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the folder path of the template. FolderPath *string `json:"folderPath,omitempty" azure:"ro"` // READ-ONLY; Gets or sets memory size in MBs for the template. MemorySizeMB *int32 `json:"memorySizeMB,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the virtual machine template. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the network interfaces of the template. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the number of vCPUs for the template. NumCPUs *int32 `json:"numCPUs,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the number of cores per socket for the template. Defaults to 1 if unspecified. NumCoresPerSocket *int32 `json:"numCoresPerSocket,omitempty" azure:"ro"` // READ-ONLY; Gets or sets os name. OSName *string `json:"osName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current version of VMware Tools. ToolsVersion *string `json:"toolsVersion,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system. ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
VirtualMachineTemplateProperties - Defines the resource properties.
func (VirtualMachineTemplateProperties) MarshalJSON ¶
func (v VirtualMachineTemplateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateProperties.
func (*VirtualMachineTemplateProperties) UnmarshalJSON ¶
func (v *VirtualMachineTemplateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateProperties.
type VirtualMachineTemplatesClient ¶
type VirtualMachineTemplatesClient struct {
// contains filtered or unexported fields
}
VirtualMachineTemplatesClient contains the methods for the VirtualMachineTemplates group. Don't use this type directly, use NewVirtualMachineTemplatesClient() instead.
func NewVirtualMachineTemplatesClient ¶
func NewVirtualMachineTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineTemplatesClient, error)
NewVirtualMachineTemplatesClient creates a new instance of VirtualMachineTemplatesClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualMachineTemplatesClient) BeginCreate ¶
func (client *VirtualMachineTemplatesClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, body VirtualMachineTemplate, options *VirtualMachineTemplatesClientBeginCreateOptions) (*runtime.Poller[VirtualMachineTemplatesClientCreateResponse], error)
BeginCreate - Create Or Update virtual machine template. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineTemplateName - Name of the virtual machine template resource. body - Request payload. options - VirtualMachineTemplatesClientBeginCreateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "WebFrontEndTemplate", armconnectedvmware.VirtualMachineTemplate{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.VirtualMachineTemplateProperties{ MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachineTemplatesClient) BeginDelete ¶
func (client *VirtualMachineTemplatesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, options *VirtualMachineTemplatesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineTemplatesClientDeleteResponse], error)
BeginDelete - Implements virtual machine template DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineTemplateName - Name of the virtual machine template resource. options - VirtualMachineTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "WebFrontEndTemplate", &armconnectedvmware.VirtualMachineTemplatesClientBeginDeleteOptions{Force: 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 (*VirtualMachineTemplatesClient) Get ¶
func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, options *VirtualMachineTemplatesClientGetOptions) (VirtualMachineTemplatesClientGetResponse, error)
Get - Implements virtual machine template GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineTemplateName - Name of the virtual machine template resource. options - VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "WebFrontEndTemplate", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualMachineTemplatesClient) NewListByResourceGroupPager ¶
func (client *VirtualMachineTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachineTemplatesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachineTemplatesClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of virtualMachineTemplates in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - VirtualMachineTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineTemplatesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualMachineTemplatesClient) NewListPager ¶
func (client *VirtualMachineTemplatesClient) NewListPager(options *VirtualMachineTemplatesClientListOptions) *runtime.Pager[VirtualMachineTemplatesClientListResponse]
NewListPager - List of virtualMachineTemplates in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - VirtualMachineTemplatesClientListOptions contains the optional parameters for the VirtualMachineTemplatesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachineTemplates.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualMachineTemplatesClient) Update ¶
func (client *VirtualMachineTemplatesClient) Update(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, body ResourcePatch, options *VirtualMachineTemplatesClientUpdateOptions) (VirtualMachineTemplatesClientUpdateResponse, error)
Update - API to update certain properties of the virtual machine template resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineTemplateName - Name of the virtual machine template resource. body - Resource properties to update. options - VirtualMachineTemplatesClientUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "WebFrontEndTemplate", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type VirtualMachineTemplatesClientBeginCreateOptions ¶
type VirtualMachineTemplatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineTemplatesClientBeginCreateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginCreate method.
type VirtualMachineTemplatesClientBeginDeleteOptions ¶
type VirtualMachineTemplatesClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginDelete method.
type VirtualMachineTemplatesClientCreateResponse ¶
type VirtualMachineTemplatesClientCreateResponse struct {
VirtualMachineTemplate
}
VirtualMachineTemplatesClientCreateResponse contains the response from method VirtualMachineTemplatesClient.Create.
type VirtualMachineTemplatesClientDeleteResponse ¶
type VirtualMachineTemplatesClientDeleteResponse struct { }
VirtualMachineTemplatesClientDeleteResponse contains the response from method VirtualMachineTemplatesClient.Delete.
type VirtualMachineTemplatesClientGetOptions ¶
type VirtualMachineTemplatesClientGetOptions struct { }
VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
type VirtualMachineTemplatesClientGetResponse ¶
type VirtualMachineTemplatesClientGetResponse struct {
VirtualMachineTemplate
}
VirtualMachineTemplatesClientGetResponse contains the response from method VirtualMachineTemplatesClient.Get.
type VirtualMachineTemplatesClientListByResourceGroupOptions ¶
type VirtualMachineTemplatesClientListByResourceGroupOptions struct { }
VirtualMachineTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineTemplatesClient.ListByResourceGroup method.
type VirtualMachineTemplatesClientListByResourceGroupResponse ¶
type VirtualMachineTemplatesClientListByResourceGroupResponse struct {
VirtualMachineTemplatesList
}
VirtualMachineTemplatesClientListByResourceGroupResponse contains the response from method VirtualMachineTemplatesClient.ListByResourceGroup.
type VirtualMachineTemplatesClientListOptions ¶
type VirtualMachineTemplatesClientListOptions struct { }
VirtualMachineTemplatesClientListOptions contains the optional parameters for the VirtualMachineTemplatesClient.List method.
type VirtualMachineTemplatesClientListResponse ¶
type VirtualMachineTemplatesClientListResponse struct {
VirtualMachineTemplatesList
}
VirtualMachineTemplatesClientListResponse contains the response from method VirtualMachineTemplatesClient.List.
type VirtualMachineTemplatesClientUpdateOptions ¶
type VirtualMachineTemplatesClientUpdateOptions struct { }
VirtualMachineTemplatesClientUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.Update method.
type VirtualMachineTemplatesClientUpdateResponse ¶
type VirtualMachineTemplatesClientUpdateResponse struct {
VirtualMachineTemplate
}
VirtualMachineTemplatesClientUpdateResponse contains the response from method VirtualMachineTemplatesClient.Update.
type VirtualMachineTemplatesList ¶
type VirtualMachineTemplatesList struct { // REQUIRED; Array of VirtualMachineTemplates Value []*VirtualMachineTemplate `json:"value,omitempty"` // Url to follow for getting next page of VirtualMachineTemplates. NextLink *string `json:"nextLink,omitempty"` }
VirtualMachineTemplatesList - List of VirtualMachineTemplates.
func (VirtualMachineTemplatesList) MarshalJSON ¶
func (v VirtualMachineTemplatesList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplatesList.
func (*VirtualMachineTemplatesList) UnmarshalJSON ¶
func (v *VirtualMachineTemplatesList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplatesList.
type VirtualMachineUpdate ¶
type VirtualMachineUpdate struct { // The identity of the resource. Identity *Identity `json:"identity,omitempty"` // Resource properties. Properties *VirtualMachineUpdateProperties `json:"properties,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
VirtualMachineUpdate - Defines the virtualMachineUpdate.
func (VirtualMachineUpdate) MarshalJSON ¶
func (v VirtualMachineUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdate.
func (*VirtualMachineUpdate) UnmarshalJSON ¶
func (v *VirtualMachineUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineUpdate.
type VirtualMachineUpdateProperties ¶
type VirtualMachineUpdateProperties struct { // Defines the resource properties. HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` // Defines the update resource properties. NetworkProfile *NetworkProfileUpdate `json:"networkProfile,omitempty"` // OS properties. OSProfile *OsProfileUpdate `json:"osProfile,omitempty"` // Defines the resource update properties. StorageProfile *StorageProfileUpdate `json:"storageProfile,omitempty"` }
VirtualMachineUpdateProperties - Defines the resource properties.
func (VirtualMachineUpdateProperties) MarshalJSON ¶
func (v VirtualMachineUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdateProperties.
func (*VirtualMachineUpdateProperties) UnmarshalJSON ¶
func (v *VirtualMachineUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineUpdateProperties.
type VirtualMachinesClient ¶
type VirtualMachinesClient struct {
// contains filtered or unexported fields
}
VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.
func NewVirtualMachinesClient ¶
func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualMachinesClient) BeginAssessPatches ¶
func (client *VirtualMachinesClient) BeginAssessPatches(ctx context.Context, resourceGroupName string, name string, options *VirtualMachinesClientBeginAssessPatchesOptions) (*runtime.Poller[VirtualMachinesClientAssessPatchesResponse], error)
BeginAssessPatches - The operation to assess patches on a vSphere VMware machine identity in Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The name of the resource group. name - The name of the vSphere VMware machine. options - VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineAssessPatches.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("{subscription-id}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginAssessPatches(ctx, "myResourceGroupName", "myMachineName", 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) BeginCreate ¶
func (client *VirtualMachinesClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualMachineName string, body VirtualMachine, options *VirtualMachinesClientBeginCreateOptions) (*runtime.Poller[VirtualMachinesClientCreateResponse], error)
BeginCreate - Create Or Update virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. body - Request payload. options - VirtualMachinesClientBeginCreateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "DemoVM", armconnectedvmware.VirtualMachine{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.VirtualMachineProperties{ HardwareProfile: &armconnectedvmware.HardwareProfile{ MemorySizeMB: to.Ptr[int32](4196), NumCPUs: to.Ptr[int32](4), }, ResourcePoolID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"), TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) BeginDelete ¶
func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
BeginDelete - Implements virtual machine DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "DemoVM", &armconnectedvmware.VirtualMachinesClientBeginDeleteOptions{Force: nil, Retain: 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 (*VirtualMachinesClient) BeginInstallPatches ¶
func (client *VirtualMachinesClient) BeginInstallPatches(ctx context.Context, resourceGroupName string, name string, installPatchesInput VirtualMachineInstallPatchesParameters, options *VirtualMachinesClientBeginInstallPatchesOptions) (*runtime.Poller[VirtualMachinesClientInstallPatchesResponse], error)
BeginInstallPatches - The operation to install patches on a vSphere VMware machine identity in Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The name of the resource group. name - The name of the vSphere VMware machine. installPatchesInput - Input for InstallPatches as directly received by the API options - VirtualMachinesClientBeginInstallPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginInstallPatches method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/VirtualMachineInstallPatches.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("{subscription-id}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginInstallPatches(ctx, "myResourceGroupName", "myMachineName", armconnectedvmware.VirtualMachineInstallPatchesParameters{ MaximumDuration: to.Ptr("PT3H"), RebootSetting: to.Ptr(armconnectedvmware.VMGuestPatchRebootSettingIfRequired), WindowsParameters: &armconnectedvmware.WindowsParameters{ ClassificationsToInclude: []*armconnectedvmware.VMGuestPatchClassificationWindows{ to.Ptr(armconnectedvmware.VMGuestPatchClassificationWindowsCritical), to.Ptr(armconnectedvmware.VMGuestPatchClassificationWindowsSecurity)}, MaxPatchPublishDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-15T02:36:43.0539904+00:00"); return t }()), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) BeginRestart ¶
func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginRestartOptions) (*runtime.Poller[VirtualMachinesClientRestartResponse], error)
BeginRestart - Restart virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/RestartVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRestart(ctx, "testrg", "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 (*VirtualMachinesClient) BeginStart ¶
func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginStartOptions) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
BeginStart - Start virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StartVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStart(ctx, "testrg", "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 (*VirtualMachinesClient) BeginStop ¶
func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginStopOptions) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
BeginStop - Stop virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. options - VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/StopVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStop(ctx, "testrg", "DemoVM", &armconnectedvmware.VirtualMachinesClientBeginStopOptions{Body: &armconnectedvmware.StopVirtualMachineOptions{ SkipShutdown: to.Ptr(true), }, }) 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 (*VirtualMachinesClient) BeginUpdate ¶
func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, body VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
BeginUpdate - API to update certain properties of the virtual machine resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. body - Resource properties to update. options - VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "DemoVM", armconnectedvmware.VirtualMachineUpdate{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) Get ¶
func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error)
Get - Implements virtual machine GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualMachineName - Name of the virtual machine resource. options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "DemoVM", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) NewListByResourceGroupPager ¶
func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachinesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of virtualMachines in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachinesByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualMachinesClient) NewListPager ¶
func (client *VirtualMachinesClient) NewListPager(options *VirtualMachinesClientListOptions) *runtime.Pager[VirtualMachinesClientListResponse]
NewListPager - List of virtualMachines in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualMachines.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VirtualMachinesClientAssessPatchesResponse ¶
type VirtualMachinesClientAssessPatchesResponse struct {
VirtualMachineAssessPatchesResult
}
VirtualMachinesClientAssessPatchesResponse contains the response from method VirtualMachinesClient.AssessPatches.
type VirtualMachinesClientBeginAssessPatchesOptions ¶
type VirtualMachinesClientBeginAssessPatchesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches method.
type VirtualMachinesClientBeginCreateOptions ¶
type VirtualMachinesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginCreateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreate method.
type VirtualMachinesClientBeginDeleteOptions ¶
type VirtualMachinesClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string // Whether to just disable the VM from azure and retain the VM in the VMM. Retain *bool }
VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
type VirtualMachinesClientBeginInstallPatchesOptions ¶
type VirtualMachinesClientBeginInstallPatchesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginInstallPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginInstallPatches method.
type VirtualMachinesClientBeginRestartOptions ¶
type VirtualMachinesClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.
type VirtualMachinesClientBeginStartOptions ¶
type VirtualMachinesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
type VirtualMachinesClientBeginStopOptions ¶
type VirtualMachinesClientBeginStopOptions struct { // Virtualmachine stop action payload. Body *StopVirtualMachineOptions // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
type VirtualMachinesClientBeginUpdateOptions ¶
type VirtualMachinesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
type VirtualMachinesClientCreateResponse ¶
type VirtualMachinesClientCreateResponse struct {
VirtualMachine
}
VirtualMachinesClientCreateResponse contains the response from method VirtualMachinesClient.Create.
type VirtualMachinesClientDeleteResponse ¶
type VirtualMachinesClientDeleteResponse struct { }
VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.Delete.
type VirtualMachinesClientGetOptions ¶
type VirtualMachinesClientGetOptions struct { }
VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
type VirtualMachinesClientGetResponse ¶
type VirtualMachinesClientGetResponse struct {
VirtualMachine
}
VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.
type VirtualMachinesClientInstallPatchesResponse ¶
type VirtualMachinesClientInstallPatchesResponse struct {
VirtualMachineInstallPatchesResult
}
VirtualMachinesClientInstallPatchesResponse contains the response from method VirtualMachinesClient.InstallPatches.
type VirtualMachinesClientListByResourceGroupOptions ¶
type VirtualMachinesClientListByResourceGroupOptions struct { }
VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.ListByResourceGroup method.
type VirtualMachinesClientListByResourceGroupResponse ¶
type VirtualMachinesClientListByResourceGroupResponse struct {
VirtualMachinesList
}
VirtualMachinesClientListByResourceGroupResponse contains the response from method VirtualMachinesClient.ListByResourceGroup.
type VirtualMachinesClientListOptions ¶
type VirtualMachinesClientListOptions struct { }
VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.List method.
type VirtualMachinesClientListResponse ¶
type VirtualMachinesClientListResponse struct {
VirtualMachinesList
}
VirtualMachinesClientListResponse contains the response from method VirtualMachinesClient.List.
type VirtualMachinesClientRestartResponse ¶
type VirtualMachinesClientRestartResponse struct { }
VirtualMachinesClientRestartResponse contains the response from method VirtualMachinesClient.Restart.
type VirtualMachinesClientStartResponse ¶
type VirtualMachinesClientStartResponse struct { }
VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.Start.
type VirtualMachinesClientStopResponse ¶
type VirtualMachinesClientStopResponse struct { }
VirtualMachinesClientStopResponse contains the response from method VirtualMachinesClient.Stop.
type VirtualMachinesClientUpdateResponse ¶
type VirtualMachinesClientUpdateResponse struct {
VirtualMachine
}
VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.Update.
type VirtualMachinesList ¶
type VirtualMachinesList struct { // REQUIRED; Array of VirtualMachines Value []*VirtualMachine `json:"value,omitempty"` // Url to follow for getting next page of VirtualMachines. NextLink *string `json:"nextLink,omitempty"` }
VirtualMachinesList - List of VirtualMachines.
func (VirtualMachinesList) MarshalJSON ¶
func (v VirtualMachinesList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachinesList.
func (*VirtualMachinesList) UnmarshalJSON ¶
func (v *VirtualMachinesList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinesList.
type VirtualNetwork ¶
type VirtualNetwork struct { // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VirtualNetworkProperties `json:"properties,omitempty"` // Gets or sets the extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Gets or sets the Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the resource. Type *string `json:"type,omitempty" azure:"ro"` }
VirtualNetwork - Define the virtualNetwork.
func (VirtualNetwork) MarshalJSON ¶
func (v VirtualNetwork) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetwork.
func (*VirtualNetwork) UnmarshalJSON ¶
func (v *VirtualNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetwork.
type VirtualNetworkInventoryItem ¶
type VirtualNetworkInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Gets or sets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty"` // Gets or sets the vCenter Managed Object name for the inventory item. MoName *string `json:"moName,omitempty"` // Gets or sets the MoRef (Managed Object Reference) ID for the inventory item. MoRefID *string `json:"moRefId,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
VirtualNetworkInventoryItem - The Virtual network inventory item.
func (*VirtualNetworkInventoryItem) GetInventoryItemProperties ¶
func (v *VirtualNetworkInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualNetworkInventoryItem.
func (VirtualNetworkInventoryItem) MarshalJSON ¶
func (v VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkInventoryItem.
func (*VirtualNetworkInventoryItem) UnmarshalJSON ¶
func (v *VirtualNetworkInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkInventoryItem.
type VirtualNetworkProperties ¶
type VirtualNetworkProperties struct { // Gets or sets the inventory Item ID for the virtual network. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual network. MoRefID *string `json:"moRefId,omitempty"` // Gets or sets the ARM Id of the vCenter resource in which this template resides. VCenterID *string `json:"vCenterId,omitempty"` // READ-ONLY; Gets the name of the corresponding resource in Kubernetes. CustomResourceName *string `json:"customResourceName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the vCenter Managed Object name for the virtual network. MoName *string `json:"moName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resource status information. Statuses []*ResourceStatus `json:"statuses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a unique identifier for this resource. UUID *string `json:"uuid,omitempty" azure:"ro"` }
VirtualNetworkProperties - Defines the resource properties.
func (VirtualNetworkProperties) MarshalJSON ¶
func (v VirtualNetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProperties.
func (*VirtualNetworkProperties) UnmarshalJSON ¶
func (v *VirtualNetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProperties.
type VirtualNetworksClient ¶
type VirtualNetworksClient struct {
// contains filtered or unexported fields
}
VirtualNetworksClient contains the methods for the VirtualNetworks group. Don't use this type directly, use NewVirtualNetworksClient() instead.
func NewVirtualNetworksClient ¶
func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error)
NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values. subscriptionID - The Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualNetworksClient) BeginCreate ¶
func (client *VirtualNetworksClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualNetworkName string, body VirtualNetwork, options *VirtualNetworksClientBeginCreateOptions) (*runtime.Poller[VirtualNetworksClientCreateResponse], error)
BeginCreate - Create Or Update virtual network. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualNetworkName - Name of the virtual network resource. body - Request payload. options - VirtualNetworksClientBeginCreateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/CreateVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "testrg", "ProdNetwork", armconnectedvmware.VirtualNetwork{ ExtendedLocation: &armconnectedvmware.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armconnectedvmware.VirtualNetworkProperties{ MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworksClient) BeginDelete ¶
func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error)
BeginDelete - Implements virtual network DELETE method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualNetworkName - Name of the virtual network resource. options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/DeleteVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "ProdNetwork", &armconnectedvmware.VirtualNetworksClientBeginDeleteOptions{Force: 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 (*VirtualNetworksClient) Get ¶
func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error)
Get - Implements virtual network GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualNetworkName - Name of the virtual network resource. options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/GetVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ProdNetwork", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworksClient) NewListByResourceGroupPager ¶
func (client *VirtualNetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualNetworksClientListByResourceGroupOptions) *runtime.Pager[VirtualNetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of virtualNetworks in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. options - VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworksByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualNetworksClient) NewListPager ¶
func (client *VirtualNetworksClient) NewListPager(options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse]
NewListPager - List of virtualNetworks in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/ListVirtualNetworks.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualNetworksClient) Update ¶
func (client *VirtualNetworksClient) Update(ctx context.Context, resourceGroupName string, virtualNetworkName string, body ResourcePatch, options *VirtualNetworksClientUpdateOptions) (VirtualNetworksClientUpdateResponse, error)
Update - API to update certain properties of the virtual network resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-10-preview resourceGroupName - The Resource Group Name. virtualNetworkName - Name of the virtual network resource. body - Resource properties to update. options - VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/preview/2022-01-10-preview/examples/UpdateVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armconnectedvmware.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "testrg", "ProdNetwork", armconnectedvmware.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type VirtualNetworksClientBeginCreateOptions ¶
type VirtualNetworksClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworksClientBeginCreateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreate method.
type VirtualNetworksClientBeginDeleteOptions ¶
type VirtualNetworksClientBeginDeleteOptions struct { // Whether force delete was specified. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.
type VirtualNetworksClientCreateResponse ¶
type VirtualNetworksClientCreateResponse struct {
VirtualNetwork
}
VirtualNetworksClientCreateResponse contains the response from method VirtualNetworksClient.Create.
type VirtualNetworksClientDeleteResponse ¶
type VirtualNetworksClientDeleteResponse struct { }
VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.Delete.
type VirtualNetworksClientGetOptions ¶
type VirtualNetworksClientGetOptions struct { }
VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
type VirtualNetworksClientGetResponse ¶
type VirtualNetworksClientGetResponse struct {
VirtualNetwork
}
VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get.
type VirtualNetworksClientListByResourceGroupOptions ¶
type VirtualNetworksClientListByResourceGroupOptions struct { }
VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.ListByResourceGroup method.
type VirtualNetworksClientListByResourceGroupResponse ¶
type VirtualNetworksClientListByResourceGroupResponse struct {
VirtualNetworksList
}
VirtualNetworksClientListByResourceGroupResponse contains the response from method VirtualNetworksClient.ListByResourceGroup.
type VirtualNetworksClientListOptions ¶
type VirtualNetworksClientListOptions struct { }
VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method.
type VirtualNetworksClientListResponse ¶
type VirtualNetworksClientListResponse struct {
VirtualNetworksList
}
VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.List.
type VirtualNetworksClientUpdateOptions ¶
type VirtualNetworksClientUpdateOptions struct { }
VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method.
type VirtualNetworksClientUpdateResponse ¶
type VirtualNetworksClientUpdateResponse struct {
VirtualNetwork
}
VirtualNetworksClientUpdateResponse contains the response from method VirtualNetworksClient.Update.
type VirtualNetworksList ¶
type VirtualNetworksList struct { // REQUIRED; Array of VirtualNetworks Value []*VirtualNetwork `json:"value,omitempty"` // Url to follow for getting next page of VirtualNetworks. NextLink *string `json:"nextLink,omitempty"` }
VirtualNetworksList - List of VirtualNetworks.
func (VirtualNetworksList) MarshalJSON ¶
func (v VirtualNetworksList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworksList.
func (*VirtualNetworksList) UnmarshalJSON ¶
func (v *VirtualNetworksList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworksList.
type VirtualSCSIController ¶
type VirtualSCSIController struct { // Gets or sets the bus number of the controller. BusNumber *int32 `json:"busNumber,omitempty"` // Gets or sets the key of the controller. ControllerKey *int32 `json:"controllerKey,omitempty"` // Gets or sets the SCSI controller unit number. ScsiCtlrUnitNumber *int32 `json:"scsiCtlrUnitNumber,omitempty"` // Gets or sets the sharing mode. Sharing *VirtualSCSISharing `json:"sharing,omitempty"` // Gets or sets the controller type. Type *SCSIControllerType `json:"type,omitempty"` }
VirtualSCSIController - This data object type contains the properties of a SCSI controller device attached to a virtual machine that is reported by the controller.
func (VirtualSCSIController) MarshalJSON ¶
func (v VirtualSCSIController) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualSCSIController.
func (*VirtualSCSIController) UnmarshalJSON ¶
func (v *VirtualSCSIController) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualSCSIController.
type VirtualSCSISharing ¶
type VirtualSCSISharing string
VirtualSCSISharing - Defines the sharing mode for sharing the SCSI bus.
const ( VirtualSCSISharingNoSharing VirtualSCSISharing = "noSharing" VirtualSCSISharingPhysicalSharing VirtualSCSISharing = "physicalSharing" VirtualSCSISharingVirtualSharing VirtualSCSISharing = "virtualSharing" )
func PossibleVirtualSCSISharingValues ¶
func PossibleVirtualSCSISharingValues() []VirtualSCSISharing
PossibleVirtualSCSISharingValues returns the possible values for the VirtualSCSISharing const type.
type WindowsParameters ¶
type WindowsParameters struct { // The update classifications to select when installing patches for Windows. ClassificationsToInclude []*VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"` // Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"` // Kbs to exclude in the patch operation KbNumbersToExclude []*string `json:"kbNumbersToExclude,omitempty"` // Kbs to include in the patch operation KbNumbersToInclude []*string `json:"kbNumbersToInclude,omitempty"` // This is used to install patches that were published on or before this given max published date. MaxPatchPublishDate *time.Time `json:"maxPatchPublishDate,omitempty"` }
WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API
func (WindowsParameters) MarshalJSON ¶
func (w WindowsParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WindowsParameters.
func (*WindowsParameters) UnmarshalJSON ¶
func (w *WindowsParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WindowsParameters.
Source Files ¶
- build.go
- clusters_client.go
- constants.go
- datastores_client.go
- guestagents_client.go
- hosts_client.go
- hybrididentitymetadata_client.go
- inventoryitems_client.go
- machineextensions_client.go
- models.go
- models_serde.go
- operations_client.go
- polymorphic_helpers.go
- resourcepools_client.go
- response_types.go
- time_rfc3339.go
- vcenters_client.go
- virtualmachines_client.go
- virtualmachinetemplates_client.go
- virtualnetworks_client.go