Documentation
¶
Index ¶
- type AADConfiguration
- type ActionType
- type AdministrativeCredentials
- type AdministratorConfiguration
- type AdministratorConfigurationPatch
- type AdvertiseToFabric
- type AgentOptions
- type AgentPool
- type AgentPoolDetailedStatus
- type AgentPoolList
- type AgentPoolMode
- type AgentPoolPatchParameters
- type AgentPoolPatchProperties
- type AgentPoolProperties
- type AgentPoolProvisioningState
- type AgentPoolUpgradeSettings
- type AgentPoolsClient
- func (client *AgentPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[AgentPoolsClientCreateOrUpdateResponse], error)
- func (client *AgentPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[AgentPoolsClientDeleteResponse], error)
- func (client *AgentPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[AgentPoolsClientUpdateResponse], error)
- func (client *AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (AgentPoolsClientGetResponse, error)
- func (client *AgentPoolsClient) NewListByKubernetesClusterPager(resourceGroupName string, kubernetesClusterName string, ...) *runtime.Pager[AgentPoolsClientListByKubernetesClusterResponse]
- type AgentPoolsClientBeginCreateOrUpdateOptions
- type AgentPoolsClientBeginDeleteOptions
- type AgentPoolsClientBeginUpdateOptions
- type AgentPoolsClientCreateOrUpdateResponse
- type AgentPoolsClientDeleteResponse
- type AgentPoolsClientGetOptions
- type AgentPoolsClientGetResponse
- type AgentPoolsClientListByKubernetesClusterOptions
- type AgentPoolsClientListByKubernetesClusterResponse
- type AgentPoolsClientUpdateResponse
- type AttachedNetworkConfiguration
- type AvailabilityLifecycle
- type AvailableUpgrade
- type BareMetalMachine
- type BareMetalMachineCommandSpecification
- type BareMetalMachineConfigurationData
- type BareMetalMachineCordonParameters
- type BareMetalMachineCordonStatus
- type BareMetalMachineDetailedStatus
- type BareMetalMachineEvacuate
- type BareMetalMachineHardwareValidationResult
- type BareMetalMachineKeySet
- type BareMetalMachineKeySetDetailedStatus
- type BareMetalMachineKeySetList
- type BareMetalMachineKeySetPatchParameters
- type BareMetalMachineKeySetPatchProperties
- type BareMetalMachineKeySetPrivilegeLevel
- type BareMetalMachineKeySetProperties
- type BareMetalMachineKeySetProvisioningState
- type BareMetalMachineKeySetUserSetupStatus
- type BareMetalMachineKeySetsClient
- func (client *BareMetalMachineKeySetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[BareMetalMachineKeySetsClientCreateOrUpdateResponse], error)
- func (client *BareMetalMachineKeySetsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[BareMetalMachineKeySetsClientDeleteResponse], error)
- func (client *BareMetalMachineKeySetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[BareMetalMachineKeySetsClientUpdateResponse], error)
- func (client *BareMetalMachineKeySetsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (BareMetalMachineKeySetsClientGetResponse, error)
- func (client *BareMetalMachineKeySetsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[BareMetalMachineKeySetsClientListByClusterResponse]
- type BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions
- type BareMetalMachineKeySetsClientBeginDeleteOptions
- type BareMetalMachineKeySetsClientBeginUpdateOptions
- type BareMetalMachineKeySetsClientCreateOrUpdateResponse
- type BareMetalMachineKeySetsClientDeleteResponse
- type BareMetalMachineKeySetsClientGetOptions
- type BareMetalMachineKeySetsClientGetResponse
- type BareMetalMachineKeySetsClientListByClusterOptions
- type BareMetalMachineKeySetsClientListByClusterResponse
- type BareMetalMachineKeySetsClientUpdateResponse
- type BareMetalMachineList
- type BareMetalMachinePatchParameters
- type BareMetalMachinePatchProperties
- type BareMetalMachinePowerOffParameters
- type BareMetalMachinePowerState
- type BareMetalMachineProperties
- type BareMetalMachineProvisioningState
- type BareMetalMachineReadyState
- type BareMetalMachineReplaceParameters
- type BareMetalMachineRunCommandParameters
- type BareMetalMachineRunDataExtractsParameters
- type BareMetalMachineRunReadCommandsParameters
- type BareMetalMachineSkipShutdown
- type BareMetalMachinesClient
- func (client *BareMetalMachinesClient) BeginCordon(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientCordonResponse], error)
- func (client *BareMetalMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientCreateOrUpdateResponse], error)
- func (client *BareMetalMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientDeleteResponse], error)
- func (client *BareMetalMachinesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientPowerOffResponse], error)
- func (client *BareMetalMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientReimageResponse], error)
- func (client *BareMetalMachinesClient) BeginReplace(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientReplaceResponse], error)
- func (client *BareMetalMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientRestartResponse], error)
- func (client *BareMetalMachinesClient) BeginRunCommand(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientRunCommandResponse], error)
- func (client *BareMetalMachinesClient) BeginRunDataExtracts(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientRunDataExtractsResponse], error)
- func (client *BareMetalMachinesClient) BeginRunReadCommands(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientRunReadCommandsResponse], error)
- func (client *BareMetalMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientStartResponse], error)
- func (client *BareMetalMachinesClient) BeginUncordon(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientUncordonResponse], error)
- func (client *BareMetalMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (*runtime.Poller[BareMetalMachinesClientUpdateResponse], error)
- func (client *BareMetalMachinesClient) Get(ctx context.Context, resourceGroupName string, bareMetalMachineName string, ...) (BareMetalMachinesClientGetResponse, error)
- func (client *BareMetalMachinesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[BareMetalMachinesClientListByResourceGroupResponse]
- func (client *BareMetalMachinesClient) NewListBySubscriptionPager(options *BareMetalMachinesClientListBySubscriptionOptions) *runtime.Pager[BareMetalMachinesClientListBySubscriptionResponse]
- type BareMetalMachinesClientBeginCordonOptions
- type BareMetalMachinesClientBeginCreateOrUpdateOptions
- type BareMetalMachinesClientBeginDeleteOptions
- type BareMetalMachinesClientBeginPowerOffOptions
- type BareMetalMachinesClientBeginReimageOptions
- type BareMetalMachinesClientBeginReplaceOptions
- type BareMetalMachinesClientBeginRestartOptions
- type BareMetalMachinesClientBeginRunCommandOptions
- type BareMetalMachinesClientBeginRunDataExtractsOptions
- type BareMetalMachinesClientBeginRunReadCommandsOptions
- type BareMetalMachinesClientBeginStartOptions
- type BareMetalMachinesClientBeginUncordonOptions
- type BareMetalMachinesClientBeginUpdateOptions
- type BareMetalMachinesClientCordonResponse
- type BareMetalMachinesClientCreateOrUpdateResponse
- type BareMetalMachinesClientDeleteResponse
- type BareMetalMachinesClientGetOptions
- type BareMetalMachinesClientGetResponse
- type BareMetalMachinesClientListByResourceGroupOptions
- type BareMetalMachinesClientListByResourceGroupResponse
- type BareMetalMachinesClientListBySubscriptionOptions
- type BareMetalMachinesClientListBySubscriptionResponse
- type BareMetalMachinesClientPowerOffResponse
- type BareMetalMachinesClientReimageResponse
- type BareMetalMachinesClientReplaceResponse
- type BareMetalMachinesClientRestartResponse
- type BareMetalMachinesClientRunCommandResponse
- type BareMetalMachinesClientRunDataExtractsResponse
- type BareMetalMachinesClientRunReadCommandsResponse
- type BareMetalMachinesClientStartResponse
- type BareMetalMachinesClientUncordonResponse
- type BareMetalMachinesClientUpdateResponse
- type BfdEnabled
- type BgpAdvertisement
- type BgpMultiHop
- type BgpServiceLoadBalancerConfiguration
- type BmcKeySet
- type BmcKeySetDetailedStatus
- type BmcKeySetList
- type BmcKeySetPatchParameters
- type BmcKeySetPatchProperties
- type BmcKeySetPrivilegeLevel
- type BmcKeySetProperties
- type BmcKeySetProvisioningState
- type BmcKeySetsClient
- func (client *BmcKeySetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[BmcKeySetsClientCreateOrUpdateResponse], error)
- func (client *BmcKeySetsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[BmcKeySetsClientDeleteResponse], error)
- func (client *BmcKeySetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[BmcKeySetsClientUpdateResponse], error)
- func (client *BmcKeySetsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (BmcKeySetsClientGetResponse, error)
- func (client *BmcKeySetsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[BmcKeySetsClientListByClusterResponse]
- type BmcKeySetsClientBeginCreateOrUpdateOptions
- type BmcKeySetsClientBeginDeleteOptions
- type BmcKeySetsClientBeginUpdateOptions
- type BmcKeySetsClientCreateOrUpdateResponse
- type BmcKeySetsClientDeleteResponse
- type BmcKeySetsClientGetOptions
- type BmcKeySetsClientGetResponse
- type BmcKeySetsClientListByClusterOptions
- type BmcKeySetsClientListByClusterResponse
- type BmcKeySetsClientUpdateResponse
- type BootstrapProtocol
- type ClientFactory
- func (c *ClientFactory) NewAgentPoolsClient() *AgentPoolsClient
- func (c *ClientFactory) NewBareMetalMachineKeySetsClient() *BareMetalMachineKeySetsClient
- func (c *ClientFactory) NewBareMetalMachinesClient() *BareMetalMachinesClient
- func (c *ClientFactory) NewBmcKeySetsClient() *BmcKeySetsClient
- func (c *ClientFactory) NewCloudServicesNetworksClient() *CloudServicesNetworksClient
- func (c *ClientFactory) NewClusterManagersClient() *ClusterManagersClient
- func (c *ClientFactory) NewClustersClient() *ClustersClient
- func (c *ClientFactory) NewConsolesClient() *ConsolesClient
- func (c *ClientFactory) NewKubernetesClusterFeaturesClient() *KubernetesClusterFeaturesClient
- func (c *ClientFactory) NewKubernetesClustersClient() *KubernetesClustersClient
- func (c *ClientFactory) NewL2NetworksClient() *L2NetworksClient
- func (c *ClientFactory) NewL3NetworksClient() *L3NetworksClient
- func (c *ClientFactory) NewMetricsConfigurationsClient() *MetricsConfigurationsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewRackSKUsClient() *RackSKUsClient
- func (c *ClientFactory) NewRacksClient() *RacksClient
- func (c *ClientFactory) NewStorageAppliancesClient() *StorageAppliancesClient
- func (c *ClientFactory) NewTrunkedNetworksClient() *TrunkedNetworksClient
- func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
- func (c *ClientFactory) NewVolumesClient() *VolumesClient
- type CloudServicesNetwork
- type CloudServicesNetworkDetailedStatus
- type CloudServicesNetworkEnableDefaultEgressEndpoints
- type CloudServicesNetworkList
- type CloudServicesNetworkPatchParameters
- type CloudServicesNetworkPatchProperties
- type CloudServicesNetworkProperties
- type CloudServicesNetworkProvisioningState
- type CloudServicesNetworksClient
- func (client *CloudServicesNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, ...) (*runtime.Poller[CloudServicesNetworksClientCreateOrUpdateResponse], error)
- func (client *CloudServicesNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, ...) (*runtime.Poller[CloudServicesNetworksClientDeleteResponse], error)
- func (client *CloudServicesNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, ...) (*runtime.Poller[CloudServicesNetworksClientUpdateResponse], error)
- func (client *CloudServicesNetworksClient) Get(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, ...) (CloudServicesNetworksClientGetResponse, error)
- func (client *CloudServicesNetworksClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[CloudServicesNetworksClientListByResourceGroupResponse]
- func (client *CloudServicesNetworksClient) NewListBySubscriptionPager(options *CloudServicesNetworksClientListBySubscriptionOptions) *runtime.Pager[CloudServicesNetworksClientListBySubscriptionResponse]
- type CloudServicesNetworksClientBeginCreateOrUpdateOptions
- type CloudServicesNetworksClientBeginDeleteOptions
- type CloudServicesNetworksClientBeginUpdateOptions
- type CloudServicesNetworksClientCreateOrUpdateResponse
- type CloudServicesNetworksClientDeleteResponse
- type CloudServicesNetworksClientGetOptions
- type CloudServicesNetworksClientGetResponse
- type CloudServicesNetworksClientListByResourceGroupOptions
- type CloudServicesNetworksClientListByResourceGroupResponse
- type CloudServicesNetworksClientListBySubscriptionOptions
- type CloudServicesNetworksClientListBySubscriptionResponse
- type CloudServicesNetworksClientUpdateResponse
- type Cluster
- type ClusterAvailableUpgradeVersion
- type ClusterAvailableVersion
- type ClusterCapacity
- type ClusterConnectionStatus
- type ClusterContinueUpdateVersionMachineGroupTargetingMode
- type ClusterContinueUpdateVersionParameters
- type ClusterDeployParameters
- type ClusterDetailedStatus
- type ClusterList
- type ClusterManager
- type ClusterManagerConnectionStatus
- type ClusterManagerDetailedStatus
- type ClusterManagerList
- type ClusterManagerPatchParameters
- type ClusterManagerProperties
- type ClusterManagerProvisioningState
- type ClusterManagersClient
- func (client *ClusterManagersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterManagerName string, ...) (*runtime.Poller[ClusterManagersClientCreateOrUpdateResponse], error)
- func (client *ClusterManagersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterManagerName string, ...) (*runtime.Poller[ClusterManagersClientDeleteResponse], error)
- func (client *ClusterManagersClient) Get(ctx context.Context, resourceGroupName string, clusterManagerName string, ...) (ClusterManagersClientGetResponse, error)
- func (client *ClusterManagersClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ClusterManagersClientListByResourceGroupResponse]
- func (client *ClusterManagersClient) NewListBySubscriptionPager(options *ClusterManagersClientListBySubscriptionOptions) *runtime.Pager[ClusterManagersClientListBySubscriptionResponse]
- func (client *ClusterManagersClient) Update(ctx context.Context, resourceGroupName string, clusterManagerName string, ...) (ClusterManagersClientUpdateResponse, error)
- type ClusterManagersClientBeginCreateOrUpdateOptions
- type ClusterManagersClientBeginDeleteOptions
- type ClusterManagersClientCreateOrUpdateResponse
- type ClusterManagersClientDeleteResponse
- type ClusterManagersClientGetOptions
- type ClusterManagersClientGetResponse
- type ClusterManagersClientListByResourceGroupOptions
- type ClusterManagersClientListByResourceGroupResponse
- type ClusterManagersClientListBySubscriptionOptions
- type ClusterManagersClientListBySubscriptionResponse
- type ClusterManagersClientUpdateOptions
- type ClusterManagersClientUpdateResponse
- type ClusterMetricsConfiguration
- type ClusterMetricsConfigurationDetailedStatus
- type ClusterMetricsConfigurationList
- type ClusterMetricsConfigurationPatchParameters
- type ClusterMetricsConfigurationPatchProperties
- type ClusterMetricsConfigurationProperties
- type ClusterMetricsConfigurationProvisioningState
- type ClusterPatchParameters
- type ClusterPatchProperties
- type ClusterProperties
- type ClusterProvisioningState
- type ClusterScanRuntimeParameters
- type ClusterScanRuntimeParametersScanActivity
- type ClusterSecretArchive
- type ClusterSecretArchiveEnabled
- type ClusterType
- type ClusterUpdateStrategy
- type ClusterUpdateStrategyType
- type ClusterUpdateVersionParameters
- type ClustersClient
- func (client *ClustersClient) BeginContinueUpdateVersion(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientContinueUpdateVersionResponse], error)
- func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error)
- func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientDeleteResponse], error)
- func (client *ClustersClient) BeginDeploy(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientDeployResponse], error)
- func (client *ClustersClient) BeginScanRuntime(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientScanRuntimeResponse], error)
- func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUpdateResponse], error)
- func (client *ClustersClient) BeginUpdateVersion(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUpdateVersionResponse], 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) NewListBySubscriptionPager(options *ClustersClientListBySubscriptionOptions) *runtime.Pager[ClustersClientListBySubscriptionResponse]
- type ClustersClientBeginContinueUpdateVersionOptions
- type ClustersClientBeginCreateOrUpdateOptions
- type ClustersClientBeginDeleteOptions
- type ClustersClientBeginDeployOptions
- type ClustersClientBeginScanRuntimeOptions
- type ClustersClientBeginUpdateOptions
- type ClustersClientBeginUpdateVersionOptions
- type ClustersClientContinueUpdateVersionResponse
- type ClustersClientCreateOrUpdateResponse
- type ClustersClientDeleteResponse
- type ClustersClientDeployResponse
- type ClustersClientGetOptions
- type ClustersClientGetResponse
- type ClustersClientListByResourceGroupOptions
- type ClustersClientListByResourceGroupResponse
- type ClustersClientListBySubscriptionOptions
- type ClustersClientListBySubscriptionResponse
- type ClustersClientScanRuntimeResponse
- type ClustersClientUpdateResponse
- type ClustersClientUpdateVersionResponse
- type CommandOutputSettings
- type Console
- type ConsoleDetailedStatus
- type ConsoleEnabled
- type ConsoleList
- type ConsolePatchParameters
- type ConsolePatchProperties
- type ConsoleProperties
- type ConsoleProvisioningState
- type ConsolesClient
- func (client *ConsolesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[ConsolesClientCreateOrUpdateResponse], error)
- func (client *ConsolesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[ConsolesClientDeleteResponse], error)
- func (client *ConsolesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[ConsolesClientUpdateResponse], error)
- func (client *ConsolesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (ConsolesClientGetResponse, error)
- func (client *ConsolesClient) NewListByVirtualMachinePager(resourceGroupName string, virtualMachineName string, ...) *runtime.Pager[ConsolesClientListByVirtualMachineResponse]
- type ConsolesClientBeginCreateOrUpdateOptions
- type ConsolesClientBeginDeleteOptions
- type ConsolesClientBeginUpdateOptions
- type ConsolesClientCreateOrUpdateResponse
- type ConsolesClientDeleteResponse
- type ConsolesClientGetOptions
- type ConsolesClientGetResponse
- type ConsolesClientListByVirtualMachineOptions
- type ConsolesClientListByVirtualMachineResponse
- type ConsolesClientUpdateResponse
- type ControlImpact
- type ControlPlaneNodeConfiguration
- type ControlPlaneNodePatchConfiguration
- type CreatedByType
- type DefaultGateway
- type DeviceConnectionType
- type DiskType
- type EgressEndpoint
- type EndpointDependency
- type ErrorAdditionalInfo
- type ErrorDetail
- type ExtendedLocation
- type FabricPeeringEnabled
- type FeatureDetailedStatus
- type FeatureStatus
- type HardwareInventory
- type HardwareInventoryNetworkInterface
- type HardwareValidationStatus
- type HugepagesSize
- type HybridAksIpamEnabled
- type HybridAksPluginType
- type IPAddressPool
- type IPAllocationType
- type IdentitySelector
- type ImageRepositoryCredentials
- type InitialAgentPoolConfiguration
- type KeySetUser
- type KeySetUserStatus
- type KubernetesCluster
- type KubernetesClusterDetailedStatus
- type KubernetesClusterFeature
- type KubernetesClusterFeatureAvailabilityLifecycle
- type KubernetesClusterFeatureDetailedStatus
- type KubernetesClusterFeatureList
- type KubernetesClusterFeaturePatchParameters
- type KubernetesClusterFeaturePatchProperties
- type KubernetesClusterFeatureProperties
- type KubernetesClusterFeatureProvisioningState
- type KubernetesClusterFeatureRequired
- type KubernetesClusterFeaturesClient
- func (client *KubernetesClusterFeaturesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClusterFeaturesClientCreateOrUpdateResponse], error)
- func (client *KubernetesClusterFeaturesClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClusterFeaturesClientDeleteResponse], error)
- func (client *KubernetesClusterFeaturesClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClusterFeaturesClientUpdateResponse], error)
- func (client *KubernetesClusterFeaturesClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (KubernetesClusterFeaturesClientGetResponse, error)
- func (client *KubernetesClusterFeaturesClient) NewListByKubernetesClusterPager(resourceGroupName string, kubernetesClusterName string, ...) *runtime.Pager[KubernetesClusterFeaturesClientListByKubernetesClusterResponse]
- type KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions
- type KubernetesClusterFeaturesClientBeginDeleteOptions
- type KubernetesClusterFeaturesClientBeginUpdateOptions
- type KubernetesClusterFeaturesClientCreateOrUpdateResponse
- type KubernetesClusterFeaturesClientDeleteResponse
- type KubernetesClusterFeaturesClientGetOptions
- type KubernetesClusterFeaturesClientGetResponse
- type KubernetesClusterFeaturesClientListByKubernetesClusterOptions
- type KubernetesClusterFeaturesClientListByKubernetesClusterResponse
- type KubernetesClusterFeaturesClientUpdateResponse
- type KubernetesClusterList
- type KubernetesClusterNode
- type KubernetesClusterNodeDetailedStatus
- type KubernetesClusterPatchParameters
- type KubernetesClusterPatchProperties
- type KubernetesClusterProperties
- type KubernetesClusterProvisioningState
- type KubernetesClusterRestartNodeParameters
- type KubernetesClustersClient
- func (client *KubernetesClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClustersClientCreateOrUpdateResponse], error)
- func (client *KubernetesClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClustersClientDeleteResponse], error)
- func (client *KubernetesClustersClient) BeginRestartNode(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClustersClientRestartNodeResponse], error)
- func (client *KubernetesClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (*runtime.Poller[KubernetesClustersClientUpdateResponse], error)
- func (client *KubernetesClustersClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, ...) (KubernetesClustersClientGetResponse, error)
- func (client *KubernetesClustersClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[KubernetesClustersClientListByResourceGroupResponse]
- func (client *KubernetesClustersClient) NewListBySubscriptionPager(options *KubernetesClustersClientListBySubscriptionOptions) *runtime.Pager[KubernetesClustersClientListBySubscriptionResponse]
- type KubernetesClustersClientBeginCreateOrUpdateOptions
- type KubernetesClustersClientBeginDeleteOptions
- type KubernetesClustersClientBeginRestartNodeOptions
- type KubernetesClustersClientBeginUpdateOptions
- type KubernetesClustersClientCreateOrUpdateResponse
- type KubernetesClustersClientDeleteResponse
- type KubernetesClustersClientGetOptions
- type KubernetesClustersClientGetResponse
- type KubernetesClustersClientListByResourceGroupOptions
- type KubernetesClustersClientListByResourceGroupResponse
- type KubernetesClustersClientListBySubscriptionOptions
- type KubernetesClustersClientListBySubscriptionResponse
- type KubernetesClustersClientRestartNodeResponse
- type KubernetesClustersClientUpdateResponse
- type KubernetesLabel
- type KubernetesNodePowerState
- type KubernetesNodeRole
- type KubernetesPluginType
- type L2Network
- type L2NetworkAttachmentConfiguration
- type L2NetworkDetailedStatus
- type L2NetworkList
- type L2NetworkPatchParameters
- type L2NetworkProperties
- type L2NetworkProvisioningState
- type L2NetworksClient
- func (client *L2NetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, l2NetworkName string, ...) (*runtime.Poller[L2NetworksClientCreateOrUpdateResponse], error)
- func (client *L2NetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, l2NetworkName string, ...) (*runtime.Poller[L2NetworksClientDeleteResponse], error)
- func (client *L2NetworksClient) Get(ctx context.Context, resourceGroupName string, l2NetworkName string, ...) (L2NetworksClientGetResponse, error)
- func (client *L2NetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *L2NetworksClientListByResourceGroupOptions) *runtime.Pager[L2NetworksClientListByResourceGroupResponse]
- func (client *L2NetworksClient) NewListBySubscriptionPager(options *L2NetworksClientListBySubscriptionOptions) *runtime.Pager[L2NetworksClientListBySubscriptionResponse]
- func (client *L2NetworksClient) Update(ctx context.Context, resourceGroupName string, l2NetworkName string, ...) (L2NetworksClientUpdateResponse, error)
- type L2NetworksClientBeginCreateOrUpdateOptions
- type L2NetworksClientBeginDeleteOptions
- type L2NetworksClientCreateOrUpdateResponse
- type L2NetworksClientDeleteResponse
- type L2NetworksClientGetOptions
- type L2NetworksClientGetResponse
- type L2NetworksClientListByResourceGroupOptions
- type L2NetworksClientListByResourceGroupResponse
- type L2NetworksClientListBySubscriptionOptions
- type L2NetworksClientListBySubscriptionResponse
- type L2NetworksClientUpdateOptions
- type L2NetworksClientUpdateResponse
- type L2ServiceLoadBalancerConfiguration
- type L3Network
- type L3NetworkAttachmentConfiguration
- type L3NetworkConfigurationIpamEnabled
- type L3NetworkDetailedStatus
- type L3NetworkList
- type L3NetworkPatchParameters
- type L3NetworkProperties
- type L3NetworkProvisioningState
- type L3NetworksClient
- func (client *L3NetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, l3NetworkName string, ...) (*runtime.Poller[L3NetworksClientCreateOrUpdateResponse], error)
- func (client *L3NetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, l3NetworkName string, ...) (*runtime.Poller[L3NetworksClientDeleteResponse], error)
- func (client *L3NetworksClient) Get(ctx context.Context, resourceGroupName string, l3NetworkName string, ...) (L3NetworksClientGetResponse, error)
- func (client *L3NetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *L3NetworksClientListByResourceGroupOptions) *runtime.Pager[L3NetworksClientListByResourceGroupResponse]
- func (client *L3NetworksClient) NewListBySubscriptionPager(options *L3NetworksClientListBySubscriptionOptions) *runtime.Pager[L3NetworksClientListBySubscriptionResponse]
- func (client *L3NetworksClient) Update(ctx context.Context, resourceGroupName string, l3NetworkName string, ...) (L3NetworksClientUpdateResponse, error)
- type L3NetworksClientBeginCreateOrUpdateOptions
- type L3NetworksClientBeginDeleteOptions
- type L3NetworksClientCreateOrUpdateResponse
- type L3NetworksClientDeleteResponse
- type L3NetworksClientGetOptions
- type L3NetworksClientGetResponse
- type L3NetworksClientListByResourceGroupOptions
- type L3NetworksClientListByResourceGroupResponse
- type L3NetworksClientListBySubscriptionOptions
- type L3NetworksClientListBySubscriptionResponse
- type L3NetworksClientUpdateOptions
- type L3NetworksClientUpdateResponse
- type LldpNeighbor
- type MachineDisk
- type MachineSKUDiskConnectionType
- type MachineSKUProperties
- type MachineSKUSlot
- type ManagedResourceGroupConfiguration
- type ManagedServiceIdentity
- type ManagedServiceIdentitySelectorType
- type ManagedServiceIdentityType
- type MetricsConfigurationsClient
- func (client *MetricsConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[MetricsConfigurationsClientCreateOrUpdateResponse], error)
- func (client *MetricsConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[MetricsConfigurationsClientDeleteResponse], error)
- func (client *MetricsConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[MetricsConfigurationsClientUpdateResponse], error)
- func (client *MetricsConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (MetricsConfigurationsClientGetResponse, error)
- func (client *MetricsConfigurationsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[MetricsConfigurationsClientListByClusterResponse]
- type MetricsConfigurationsClientBeginCreateOrUpdateOptions
- type MetricsConfigurationsClientBeginDeleteOptions
- type MetricsConfigurationsClientBeginUpdateOptions
- type MetricsConfigurationsClientCreateOrUpdateResponse
- type MetricsConfigurationsClientDeleteResponse
- type MetricsConfigurationsClientGetOptions
- type MetricsConfigurationsClientGetResponse
- type MetricsConfigurationsClientListByClusterOptions
- type MetricsConfigurationsClientListByClusterResponse
- type MetricsConfigurationsClientUpdateResponse
- type NetworkAttachment
- type NetworkConfiguration
- type NetworkInterface
- type Nic
- type NodePoolAdministratorConfigurationPatch
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationStatusResult
- type OperationStatusResultProperties
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type OsDisk
- type OsDiskCreateOption
- type OsDiskDeleteOption
- type Rack
- type RackDefinition
- type RackDetailedStatus
- type RackList
- type RackPatchParameters
- type RackProperties
- type RackProvisioningState
- type RackSKU
- type RackSKUList
- type RackSKUProperties
- type RackSKUProvisioningState
- type RackSKUType
- type RackSKUsClient
- func (client *RackSKUsClient) Get(ctx context.Context, rackSKUName string, options *RackSKUsClientGetOptions) (RackSKUsClientGetResponse, error)
- func (client *RackSKUsClient) NewListBySubscriptionPager(options *RackSKUsClientListBySubscriptionOptions) *runtime.Pager[RackSKUsClientListBySubscriptionResponse]
- type RackSKUsClientGetOptions
- type RackSKUsClientGetResponse
- type RackSKUsClientListBySubscriptionOptions
- type RackSKUsClientListBySubscriptionResponse
- type RacksClient
- func (client *RacksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, rackName string, ...) (*runtime.Poller[RacksClientCreateOrUpdateResponse], error)
- func (client *RacksClient) BeginDelete(ctx context.Context, resourceGroupName string, rackName string, ...) (*runtime.Poller[RacksClientDeleteResponse], error)
- func (client *RacksClient) BeginUpdate(ctx context.Context, resourceGroupName string, rackName string, ...) (*runtime.Poller[RacksClientUpdateResponse], error)
- func (client *RacksClient) Get(ctx context.Context, resourceGroupName string, rackName string, ...) (RacksClientGetResponse, error)
- func (client *RacksClient) NewListByResourceGroupPager(resourceGroupName string, options *RacksClientListByResourceGroupOptions) *runtime.Pager[RacksClientListByResourceGroupResponse]
- func (client *RacksClient) NewListBySubscriptionPager(options *RacksClientListBySubscriptionOptions) *runtime.Pager[RacksClientListBySubscriptionResponse]
- type RacksClientBeginCreateOrUpdateOptions
- type RacksClientBeginDeleteOptions
- type RacksClientBeginUpdateOptions
- type RacksClientCreateOrUpdateResponse
- type RacksClientDeleteResponse
- type RacksClientGetOptions
- type RacksClientGetResponse
- type RacksClientListByResourceGroupOptions
- type RacksClientListByResourceGroupResponse
- type RacksClientListBySubscriptionOptions
- type RacksClientListBySubscriptionResponse
- type RacksClientUpdateResponse
- type RacksPatchProperties
- type RemoteVendorManagementFeature
- type RemoteVendorManagementStatus
- type RuntimeProtectionConfiguration
- type RuntimeProtectionEnforcementLevel
- type RuntimeProtectionStatus
- type SSHPublicKey
- type SecretArchiveReference
- type SecretRotationStatus
- type ServiceLoadBalancerBgpPeer
- type ServicePrincipalInformation
- type SkipShutdown
- type StorageAppliance
- type StorageApplianceConfigurationData
- type StorageApplianceDetailedStatus
- type StorageApplianceEnableRemoteVendorManagementParameters
- type StorageApplianceList
- type StorageAppliancePatchParameters
- type StorageAppliancePatchProperties
- type StorageApplianceProperties
- type StorageApplianceProvisioningState
- type StorageApplianceSKUProperties
- type StorageApplianceSKUSlot
- type StorageAppliancesClient
- func (client *StorageAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, storageApplianceName string, ...) (*runtime.Poller[StorageAppliancesClientCreateOrUpdateResponse], error)
- func (client *StorageAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, storageApplianceName string, ...) (*runtime.Poller[StorageAppliancesClientDeleteResponse], error)
- func (client *StorageAppliancesClient) BeginDisableRemoteVendorManagement(ctx context.Context, resourceGroupName string, storageApplianceName string, ...) (*runtime.Poller[StorageAppliancesClientDisableRemoteVendorManagementResponse], ...)
- func (client *StorageAppliancesClient) BeginEnableRemoteVendorManagement(ctx context.Context, resourceGroupName string, storageApplianceName string, ...) (*runtime.Poller[StorageAppliancesClientEnableRemoteVendorManagementResponse], ...)
- func (client *StorageAppliancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageApplianceName string, ...) (*runtime.Poller[StorageAppliancesClientUpdateResponse], error)
- func (client *StorageAppliancesClient) Get(ctx context.Context, resourceGroupName string, storageApplianceName string, ...) (StorageAppliancesClientGetResponse, error)
- func (client *StorageAppliancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[StorageAppliancesClientListByResourceGroupResponse]
- func (client *StorageAppliancesClient) NewListBySubscriptionPager(options *StorageAppliancesClientListBySubscriptionOptions) *runtime.Pager[StorageAppliancesClientListBySubscriptionResponse]
- type StorageAppliancesClientBeginCreateOrUpdateOptions
- type StorageAppliancesClientBeginDeleteOptions
- type StorageAppliancesClientBeginDisableRemoteVendorManagementOptions
- type StorageAppliancesClientBeginEnableRemoteVendorManagementOptions
- type StorageAppliancesClientBeginUpdateOptions
- type StorageAppliancesClientCreateOrUpdateResponse
- type StorageAppliancesClientDeleteResponse
- type StorageAppliancesClientDisableRemoteVendorManagementResponse
- type StorageAppliancesClientEnableRemoteVendorManagementResponse
- type StorageAppliancesClientGetOptions
- type StorageAppliancesClientGetResponse
- type StorageAppliancesClientListByResourceGroupOptions
- type StorageAppliancesClientListByResourceGroupResponse
- type StorageAppliancesClientListBySubscriptionOptions
- type StorageAppliancesClientListBySubscriptionResponse
- type StorageAppliancesClientUpdateResponse
- type StorageProfile
- type StringKeyValuePair
- type SystemData
- type TrunkedNetwork
- type TrunkedNetworkAttachmentConfiguration
- type TrunkedNetworkDetailedStatus
- type TrunkedNetworkList
- type TrunkedNetworkPatchParameters
- type TrunkedNetworkProperties
- type TrunkedNetworkProvisioningState
- type TrunkedNetworksClient
- func (client *TrunkedNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, trunkedNetworkName string, ...) (*runtime.Poller[TrunkedNetworksClientCreateOrUpdateResponse], error)
- func (client *TrunkedNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, trunkedNetworkName string, ...) (*runtime.Poller[TrunkedNetworksClientDeleteResponse], error)
- func (client *TrunkedNetworksClient) Get(ctx context.Context, resourceGroupName string, trunkedNetworkName string, ...) (TrunkedNetworksClientGetResponse, error)
- func (client *TrunkedNetworksClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[TrunkedNetworksClientListByResourceGroupResponse]
- func (client *TrunkedNetworksClient) NewListBySubscriptionPager(options *TrunkedNetworksClientListBySubscriptionOptions) *runtime.Pager[TrunkedNetworksClientListBySubscriptionResponse]
- func (client *TrunkedNetworksClient) Update(ctx context.Context, resourceGroupName string, trunkedNetworkName string, ...) (TrunkedNetworksClientUpdateResponse, error)
- type TrunkedNetworksClientBeginCreateOrUpdateOptions
- type TrunkedNetworksClientBeginDeleteOptions
- type TrunkedNetworksClientCreateOrUpdateResponse
- type TrunkedNetworksClientDeleteResponse
- type TrunkedNetworksClientGetOptions
- type TrunkedNetworksClientGetResponse
- type TrunkedNetworksClientListByResourceGroupOptions
- type TrunkedNetworksClientListByResourceGroupResponse
- type TrunkedNetworksClientListBySubscriptionOptions
- type TrunkedNetworksClientListBySubscriptionResponse
- type TrunkedNetworksClientUpdateOptions
- type TrunkedNetworksClientUpdateResponse
- type UserAssignedIdentity
- type ValidationThreshold
- type ValidationThresholdGrouping
- type ValidationThresholdType
- type VirtualMachine
- type VirtualMachineBootMethod
- type VirtualMachineDetailedStatus
- type VirtualMachineDeviceModelType
- type VirtualMachineIPAllocationMethod
- type VirtualMachineIsolateEmulatorThread
- type VirtualMachineList
- type VirtualMachinePatchParameters
- type VirtualMachinePatchProperties
- type VirtualMachinePlacementHint
- type VirtualMachinePlacementHintPodAffinityScope
- type VirtualMachinePlacementHintType
- type VirtualMachinePowerOffParameters
- type VirtualMachinePowerState
- type VirtualMachineProperties
- type VirtualMachineProvisioningState
- type VirtualMachineSchedulingExecution
- type VirtualMachineVirtioInterfaceType
- type VirtualMachinesClient
- func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error)
- func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
- func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientPowerOffResponse], error)
- func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientReimageResponse], 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) 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) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse]
- type VirtualMachinesClientBeginCreateOrUpdateOptions
- type VirtualMachinesClientBeginDeleteOptions
- type VirtualMachinesClientBeginPowerOffOptions
- type VirtualMachinesClientBeginReimageOptions
- type VirtualMachinesClientBeginRestartOptions
- type VirtualMachinesClientBeginStartOptions
- type VirtualMachinesClientBeginUpdateOptions
- type VirtualMachinesClientCreateOrUpdateResponse
- type VirtualMachinesClientDeleteResponse
- type VirtualMachinesClientGetOptions
- type VirtualMachinesClientGetResponse
- type VirtualMachinesClientListByResourceGroupOptions
- type VirtualMachinesClientListByResourceGroupResponse
- type VirtualMachinesClientListBySubscriptionOptions
- type VirtualMachinesClientListBySubscriptionResponse
- type VirtualMachinesClientPowerOffResponse
- type VirtualMachinesClientReimageResponse
- type VirtualMachinesClientRestartResponse
- type VirtualMachinesClientStartResponse
- type VirtualMachinesClientUpdateResponse
- type Volume
- type VolumeDetailedStatus
- type VolumeList
- type VolumePatchParameters
- type VolumeProperties
- type VolumeProvisioningState
- type VolumesClient
- func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, volumeName string, ...) (*runtime.Poller[VolumesClientCreateOrUpdateResponse], error)
- func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, volumeName string, ...) (*runtime.Poller[VolumesClientDeleteResponse], error)
- func (client *VolumesClient) Get(ctx context.Context, resourceGroupName string, volumeName string, ...) (VolumesClientGetResponse, error)
- func (client *VolumesClient) NewListByResourceGroupPager(resourceGroupName string, options *VolumesClientListByResourceGroupOptions) *runtime.Pager[VolumesClientListByResourceGroupResponse]
- func (client *VolumesClient) NewListBySubscriptionPager(options *VolumesClientListBySubscriptionOptions) *runtime.Pager[VolumesClientListBySubscriptionResponse]
- func (client *VolumesClient) Update(ctx context.Context, resourceGroupName string, volumeName string, ...) (VolumesClientUpdateResponse, error)
- type VolumesClientBeginCreateOrUpdateOptions
- type VolumesClientBeginDeleteOptions
- type VolumesClientCreateOrUpdateResponse
- type VolumesClientDeleteResponse
- type VolumesClientGetOptions
- type VolumesClientGetResponse
- type VolumesClientListByResourceGroupOptions
- type VolumesClientListByResourceGroupResponse
- type VolumesClientListBySubscriptionOptions
- type VolumesClientListBySubscriptionResponse
- type VolumesClientUpdateOptions
- type VolumesClientUpdateResponse
- type WorkloadImpact
Examples ¶
- AgentPoolsClient.BeginCreateOrUpdate
- AgentPoolsClient.BeginDelete
- AgentPoolsClient.BeginUpdate
- AgentPoolsClient.Get
- AgentPoolsClient.NewListByKubernetesClusterPager
- BareMetalMachineKeySetsClient.BeginCreateOrUpdate
- BareMetalMachineKeySetsClient.BeginDelete
- BareMetalMachineKeySetsClient.BeginUpdate
- BareMetalMachineKeySetsClient.Get
- BareMetalMachineKeySetsClient.NewListByClusterPager
- BareMetalMachinesClient.BeginCordon
- BareMetalMachinesClient.BeginCreateOrUpdate
- BareMetalMachinesClient.BeginDelete
- BareMetalMachinesClient.BeginPowerOff
- BareMetalMachinesClient.BeginReimage
- BareMetalMachinesClient.BeginReplace
- BareMetalMachinesClient.BeginRestart
- BareMetalMachinesClient.BeginRunCommand
- BareMetalMachinesClient.BeginRunDataExtracts
- BareMetalMachinesClient.BeginRunReadCommands
- BareMetalMachinesClient.BeginStart
- BareMetalMachinesClient.BeginUncordon
- BareMetalMachinesClient.BeginUpdate
- BareMetalMachinesClient.Get
- BareMetalMachinesClient.NewListByResourceGroupPager
- BareMetalMachinesClient.NewListBySubscriptionPager
- BmcKeySetsClient.BeginCreateOrUpdate
- BmcKeySetsClient.BeginDelete
- BmcKeySetsClient.BeginUpdate
- BmcKeySetsClient.Get
- BmcKeySetsClient.NewListByClusterPager
- CloudServicesNetworksClient.BeginCreateOrUpdate
- CloudServicesNetworksClient.BeginDelete
- CloudServicesNetworksClient.BeginUpdate
- CloudServicesNetworksClient.Get
- CloudServicesNetworksClient.NewListByResourceGroupPager
- CloudServicesNetworksClient.NewListBySubscriptionPager
- ClusterManagersClient.BeginCreateOrUpdate (CreateOrUpdateClusterManager)
- ClusterManagersClient.BeginCreateOrUpdate (CreateOrUpdateClusterManagerWithUserAssignedIdentity)
- ClusterManagersClient.BeginDelete
- ClusterManagersClient.Get
- ClusterManagersClient.NewListByResourceGroupPager
- ClusterManagersClient.NewListBySubscriptionPager
- ClusterManagersClient.Update
- ClustersClient.BeginContinueUpdateVersion
- ClustersClient.BeginCreateOrUpdate
- ClustersClient.BeginDelete
- ClustersClient.BeginDeploy (DeployCluster)
- ClustersClient.BeginDeploy (DeployClusterSkippingValidation)
- ClustersClient.BeginScanRuntime
- ClustersClient.BeginUpdate (PatchClusterAggregatorOrSingleRackDefinition)
- ClustersClient.BeginUpdate (PatchClusterCommandOutput)
- ClustersClient.BeginUpdate (PatchClusterLocation)
- ClustersClient.BeginUpdate (PatchRuntimeProtectionConfiguration)
- ClustersClient.BeginUpdate (PatchSecretArchive)
- ClustersClient.BeginUpdate (PatchUpdateStrategy)
- ClustersClient.BeginUpdateVersion
- ClustersClient.Get
- ClustersClient.NewListByResourceGroupPager
- ClustersClient.NewListBySubscriptionPager
- ConsolesClient.BeginCreateOrUpdate
- ConsolesClient.BeginDelete
- ConsolesClient.BeginUpdate
- ConsolesClient.Get
- ConsolesClient.NewListByVirtualMachinePager
- KubernetesClusterFeaturesClient.BeginCreateOrUpdate
- KubernetesClusterFeaturesClient.BeginDelete
- KubernetesClusterFeaturesClient.BeginUpdate
- KubernetesClusterFeaturesClient.Get
- KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager
- KubernetesClustersClient.BeginCreateOrUpdate (CreateOrUpdateKubernetesCluster)
- KubernetesClustersClient.BeginCreateOrUpdate (CreateOrUpdateKubernetesClusterWithALayer2LoadBalancer)
- KubernetesClustersClient.BeginDelete
- KubernetesClustersClient.BeginRestartNode
- KubernetesClustersClient.BeginUpdate
- KubernetesClustersClient.Get
- KubernetesClustersClient.NewListByResourceGroupPager
- KubernetesClustersClient.NewListBySubscriptionPager
- L2NetworksClient.BeginCreateOrUpdate
- L2NetworksClient.BeginDelete
- L2NetworksClient.Get
- L2NetworksClient.NewListByResourceGroupPager
- L2NetworksClient.NewListBySubscriptionPager
- L2NetworksClient.Update
- L3NetworksClient.BeginCreateOrUpdate
- L3NetworksClient.BeginDelete
- L3NetworksClient.Get
- L3NetworksClient.NewListByResourceGroupPager
- L3NetworksClient.NewListBySubscriptionPager
- L3NetworksClient.Update
- MetricsConfigurationsClient.BeginCreateOrUpdate
- MetricsConfigurationsClient.BeginDelete
- MetricsConfigurationsClient.BeginUpdate
- MetricsConfigurationsClient.Get
- MetricsConfigurationsClient.NewListByClusterPager
- OperationsClient.NewListPager
- RackSKUsClient.Get
- RackSKUsClient.NewListBySubscriptionPager
- RacksClient.BeginCreateOrUpdate
- RacksClient.BeginDelete
- RacksClient.BeginUpdate
- RacksClient.Get
- RacksClient.NewListByResourceGroupPager
- RacksClient.NewListBySubscriptionPager
- StorageAppliancesClient.BeginCreateOrUpdate
- StorageAppliancesClient.BeginDelete
- StorageAppliancesClient.BeginDisableRemoteVendorManagement
- StorageAppliancesClient.BeginEnableRemoteVendorManagement
- StorageAppliancesClient.BeginUpdate
- StorageAppliancesClient.Get
- StorageAppliancesClient.NewListByResourceGroupPager
- StorageAppliancesClient.NewListBySubscriptionPager
- TrunkedNetworksClient.BeginCreateOrUpdate
- TrunkedNetworksClient.BeginDelete
- TrunkedNetworksClient.Get
- TrunkedNetworksClient.NewListByResourceGroupPager
- TrunkedNetworksClient.NewListBySubscriptionPager
- TrunkedNetworksClient.Update
- VirtualMachinesClient.BeginCreateOrUpdate
- VirtualMachinesClient.BeginDelete
- VirtualMachinesClient.BeginPowerOff
- VirtualMachinesClient.BeginReimage
- VirtualMachinesClient.BeginRestart
- VirtualMachinesClient.BeginStart
- VirtualMachinesClient.BeginUpdate
- VirtualMachinesClient.Get
- VirtualMachinesClient.NewListByResourceGroupPager
- VirtualMachinesClient.NewListBySubscriptionPager
- VolumesClient.BeginCreateOrUpdate
- VolumesClient.BeginDelete
- VolumesClient.Get
- VolumesClient.NewListByResourceGroupPager
- VolumesClient.NewListBySubscriptionPager
- VolumesClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AADConfiguration ¶ added in v0.2.0
type AADConfiguration struct { // REQUIRED; The list of Azure Active Directory group object IDs that will have an administrative role on the Kubernetes cluster. AdminGroupObjectIDs []*string }
AADConfiguration - AadConfiguration represents the Azure Active Directory Integration properties.
func (AADConfiguration) MarshalJSON ¶ added in v0.2.0
func (a AADConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AADConfiguration.
func (*AADConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (a *AADConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AADConfiguration.
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type AdministrativeCredentials ¶
type AdministrativeCredentials struct { // REQUIRED; The password of the administrator of the device used during initialization. Password *string // REQUIRED; The username of the administrator of the device used during initialization. Username *string }
AdministrativeCredentials represents the admin credentials for the device requiring password-based authentication.
func (AdministrativeCredentials) MarshalJSON ¶
func (a AdministrativeCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdministrativeCredentials.
func (*AdministrativeCredentials) UnmarshalJSON ¶
func (a *AdministrativeCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdministrativeCredentials.
type AdministratorConfiguration ¶ added in v0.2.0
type AdministratorConfiguration struct { // The user name for the administrator that will be applied to the operating systems that run Kubernetes nodes. If not supplied, // a user name will be chosen by the service. AdminUsername *string // The SSH configuration for the operating systems that run the nodes in the Kubernetes cluster. In some cases, specification // of public keys may be required to produce a working environment. SSHPublicKeys []*SSHPublicKey }
AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters.
func (AdministratorConfiguration) MarshalJSON ¶ added in v0.2.0
func (a AdministratorConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdministratorConfiguration.
func (*AdministratorConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (a *AdministratorConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorConfiguration.
type AdministratorConfigurationPatch ¶ added in v1.2.0
type AdministratorConfigurationPatch struct { // SshPublicKey represents the public key used to authenticate with a resource through SSH. SSHPublicKeys []*SSHPublicKey }
AdministratorConfigurationPatch represents the patching capabilities for the administrator configuration.
func (AdministratorConfigurationPatch) MarshalJSON ¶ added in v1.2.0
func (a AdministratorConfigurationPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdministratorConfigurationPatch.
func (*AdministratorConfigurationPatch) UnmarshalJSON ¶ added in v1.2.0
func (a *AdministratorConfigurationPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorConfigurationPatch.
type AdvertiseToFabric ¶ added in v0.2.0
type AdvertiseToFabric string
AdvertiseToFabric - The indicator of if this advertisement is also made to the network fabric associated with the Network Cloud Cluster. This field is ignored if fabricPeeringEnabled is set to False.
const ( AdvertiseToFabricFalse AdvertiseToFabric = "False" AdvertiseToFabricTrue AdvertiseToFabric = "True" )
func PossibleAdvertiseToFabricValues ¶ added in v0.2.0
func PossibleAdvertiseToFabricValues() []AdvertiseToFabric
PossibleAdvertiseToFabricValues returns the possible values for the AdvertiseToFabric const type.
type AgentOptions ¶ added in v0.2.0
type AgentOptions struct { // REQUIRED; The number of hugepages to allocate. HugepagesCount *int64 // The size of the hugepages to allocate. HugepagesSize *HugepagesSize }
AgentOptions are configurations that will be applied to each agent in an agent pool.
func (AgentOptions) MarshalJSON ¶ added in v0.2.0
func (a AgentOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentOptions.
func (*AgentOptions) UnmarshalJSON ¶ added in v0.2.0
func (a *AgentOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentOptions.
type AgentPool ¶ added in v0.2.0
type AgentPool struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *AgentPoolProperties // The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AgentPool represents the agent pool of Kubernetes cluster.
func (AgentPool) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type AgentPool.
func (*AgentPool) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type AgentPool.
type AgentPoolDetailedStatus ¶ added in v0.2.0
type AgentPoolDetailedStatus string
AgentPoolDetailedStatus - The current status of the agent pool.
const ( AgentPoolDetailedStatusAvailable AgentPoolDetailedStatus = "Available" AgentPoolDetailedStatusError AgentPoolDetailedStatus = "Error" AgentPoolDetailedStatusProvisioning AgentPoolDetailedStatus = "Provisioning" )
func PossibleAgentPoolDetailedStatusValues ¶ added in v0.2.0
func PossibleAgentPoolDetailedStatusValues() []AgentPoolDetailedStatus
PossibleAgentPoolDetailedStatusValues returns the possible values for the AgentPoolDetailedStatus const type.
type AgentPoolList ¶ added in v0.2.0
type AgentPoolList struct { // The link used to get the next page of operations. NextLink *string // The list of agent pools. Value []*AgentPool }
AgentPoolList represents a list of Kubernetes cluster agent pools.
func (AgentPoolList) MarshalJSON ¶ added in v0.2.0
func (a AgentPoolList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentPoolList.
func (*AgentPoolList) UnmarshalJSON ¶ added in v0.2.0
func (a *AgentPoolList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolList.
type AgentPoolMode ¶ added in v0.2.0
type AgentPoolMode string
AgentPoolMode - The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node.
const ( AgentPoolModeNotApplicable AgentPoolMode = "NotApplicable" AgentPoolModeSystem AgentPoolMode = "System" AgentPoolModeUser AgentPoolMode = "User" )
func PossibleAgentPoolModeValues ¶ added in v0.2.0
func PossibleAgentPoolModeValues() []AgentPoolMode
PossibleAgentPoolModeValues returns the possible values for the AgentPoolMode const type.
type AgentPoolPatchParameters ¶ added in v0.2.0
type AgentPoolPatchParameters struct { // The list of the resource properties. Properties *AgentPoolPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
AgentPoolPatchParameters represents the body of the request to patch the Kubernetes cluster agent pool.
func (AgentPoolPatchParameters) MarshalJSON ¶ added in v0.2.0
func (a AgentPoolPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentPoolPatchParameters.
func (*AgentPoolPatchParameters) UnmarshalJSON ¶ added in v0.2.0
func (a *AgentPoolPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolPatchParameters.
type AgentPoolPatchProperties ¶ added in v0.2.0
type AgentPoolPatchProperties struct { // The configuration of administrator credentials for the control plane nodes. AdministratorConfiguration *NodePoolAdministratorConfigurationPatch // The number of virtual machines that use this configuration. Count *int64 // The configuration of the agent pool. UpgradeSettings *AgentPoolUpgradeSettings }
AgentPoolPatchProperties represents the properties of an agent pool that can be modified.
func (AgentPoolPatchProperties) MarshalJSON ¶ added in v0.2.0
func (a AgentPoolPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentPoolPatchProperties.
func (*AgentPoolPatchProperties) UnmarshalJSON ¶ added in v0.2.0
func (a *AgentPoolPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolPatchProperties.
type AgentPoolProperties ¶ added in v0.2.0
type AgentPoolProperties struct { // REQUIRED; The number of virtual machines that use this configuration. Count *int64 // REQUIRED; The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the // features and critical services for the Kubernetes Cluster, while user pools are dedicated // to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. Mode *AgentPoolMode // REQUIRED; The name of the VM SKU that determines the size of resources allocated for node VMs. VMSKUName *string // The administrator credentials to be used for the nodes in this agent pool. AdministratorConfiguration *AdministratorConfiguration // The configurations that will be applied to each agent in this agent pool. AgentOptions *AgentOptions // The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. AttachedNetworkConfiguration *AttachedNetworkConfiguration // The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not // specified, all availability zones will be used. AvailabilityZones []*string // The labels applied to the nodes in this agent pool. Labels []*KubernetesLabel // The taints applied to the nodes in this agent pool. Taints []*KubernetesLabel // The configuration of the agent pool. UpgradeSettings *AgentPoolUpgradeSettings // READ-ONLY; The current status of the agent pool. DetailedStatus *AgentPoolDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The Kubernetes version running in this agent pool. KubernetesVersion *string // READ-ONLY; The provisioning state of the agent pool. ProvisioningState *AgentPoolProvisioningState }
AgentPoolProperties represents the properties of the Kubernetes cluster agent pool.
func (AgentPoolProperties) MarshalJSON ¶ added in v0.2.0
func (a AgentPoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentPoolProperties.
func (*AgentPoolProperties) UnmarshalJSON ¶ added in v0.2.0
func (a *AgentPoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolProperties.
type AgentPoolProvisioningState ¶ added in v0.2.0
type AgentPoolProvisioningState string
AgentPoolProvisioningState - The provisioning state of the agent pool.
const ( AgentPoolProvisioningStateAccepted AgentPoolProvisioningState = "Accepted" AgentPoolProvisioningStateCanceled AgentPoolProvisioningState = "Canceled" AgentPoolProvisioningStateDeleting AgentPoolProvisioningState = "Deleting" AgentPoolProvisioningStateFailed AgentPoolProvisioningState = "Failed" AgentPoolProvisioningStateInProgress AgentPoolProvisioningState = "InProgress" AgentPoolProvisioningStateSucceeded AgentPoolProvisioningState = "Succeeded" AgentPoolProvisioningStateUpdating AgentPoolProvisioningState = "Updating" )
func PossibleAgentPoolProvisioningStateValues ¶ added in v0.2.0
func PossibleAgentPoolProvisioningStateValues() []AgentPoolProvisioningState
PossibleAgentPoolProvisioningStateValues returns the possible values for the AgentPoolProvisioningState const type.
type AgentPoolUpgradeSettings ¶ added in v0.2.0
type AgentPoolUpgradeSettings struct { // The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent // pool. If not specified during creation, a value of 1800 seconds is used. DrainTimeout *int64 // The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') // or a percentage (e.g. '50%'). If a percentage is specified, it is the // percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If // not specified during creation, a value of 1 is used. One of MaxSurge and // MaxUnavailable must be greater than 0. MaxSurge *string // (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the // percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If // not specified during creation, a value of 0 is used. One of MaxSurge and // MaxUnavailable must be greater than 0. MaxUnavailable *string }
AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
func (AgentPoolUpgradeSettings) MarshalJSON ¶ added in v0.2.0
func (a AgentPoolUpgradeSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentPoolUpgradeSettings.
func (*AgentPoolUpgradeSettings) UnmarshalJSON ¶ added in v0.2.0
func (a *AgentPoolUpgradeSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolUpgradeSettings.
type AgentPoolsClient ¶ added in v0.2.0
type AgentPoolsClient struct {
// contains filtered or unexported fields
}
AgentPoolsClient contains the methods for the AgentPools group. Don't use this type directly, use NewAgentPoolsClient() instead.
func NewAgentPoolsClient ¶ added in v0.2.0
func NewAgentPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentPoolsClient, error)
NewAgentPoolsClient creates a new instance of AgentPoolsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AgentPoolsClient) BeginCreateOrUpdate ¶ added in v0.2.0
func (client *AgentPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, agentPoolParameters AgentPool, options *AgentPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AgentPoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new Kubernetes cluster agent pool or update the properties of the existing one. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- agentPoolName - The name of the Kubernetes cluster agent pool.
- agentPoolParameters - The request body.
- options - AgentPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the AgentPoolsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/AgentPools_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "agentPoolName", armnetworkcloud.AgentPool{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.AgentPoolProperties{ AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, AgentOptions: &armnetworkcloud.AgentOptions{ HugepagesCount: to.Ptr[int64](96), HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), }, AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), }}, L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ { IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), }}, TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), }}, }, AvailabilityZones: []*string{ to.Ptr("1"), to.Ptr("2"), to.Ptr("3")}, Count: to.Ptr[int64](3), Labels: []*armnetworkcloud.KubernetesLabel{ { Key: to.Ptr("kubernetes.label"), Value: to.Ptr("true"), }}, Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), Taints: []*armnetworkcloud.KubernetesLabel{ { Key: to.Ptr("kubernetes.taint"), Value: to.Ptr("true:NoSchedule"), }}, UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ MaxSurge: to.Ptr("1"), }, VMSKUName: to.Ptr("NC_P46_224_v1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentPool = armnetworkcloud.AgentPool{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/agentPools"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.AgentPoolProperties{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // ProvisioningState: to.Ptr(armnetworkcloud.AgentPoolProvisioningStateSucceeded), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // } }
Output:
func (*AgentPoolsClient) BeginDelete ¶ added in v0.2.0
func (client *AgentPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, options *AgentPoolsClientBeginDeleteOptions) (*runtime.Poller[AgentPoolsClientDeleteResponse], error)
BeginDelete - Delete the provided Kubernetes cluster agent pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- agentPoolName - The name of the Kubernetes cluster agent pool.
- options - AgentPoolsClientBeginDeleteOptions contains the optional parameters for the AgentPoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/AgentPools_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "resourceGroupName", "kubernetesClusterName", "agentPoolName", 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 (*AgentPoolsClient) BeginUpdate ¶ added in v0.2.0
func (client *AgentPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, agentPoolUpdateParameters AgentPoolPatchParameters, options *AgentPoolsClientBeginUpdateOptions) (*runtime.Poller[AgentPoolsClientUpdateResponse], error)
BeginUpdate - Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- agentPoolName - The name of the Kubernetes cluster agent pool.
- agentPoolUpdateParameters - The request body.
- options - AgentPoolsClientBeginUpdateOptions contains the optional parameters for the AgentPoolsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/AgentPools_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAgentPoolsClient().BeginUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "agentPoolName", armnetworkcloud.AgentPoolPatchParameters{ Properties: &armnetworkcloud.AgentPoolPatchProperties{ AdministratorConfiguration: &armnetworkcloud.NodePoolAdministratorConfigurationPatch{ SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, Count: to.Ptr[int64](3), UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ DrainTimeout: to.Ptr[int64](1800), MaxSurge: to.Ptr("1"), MaxUnavailable: to.Ptr("0"), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentPool = armnetworkcloud.AgentPool{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/agentPools"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.AgentPoolProperties{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // ProvisioningState: to.Ptr(armnetworkcloud.AgentPoolProvisioningStateSucceeded), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // } }
Output:
func (*AgentPoolsClient) Get ¶ added in v0.2.0
func (client *AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, agentPoolName string, options *AgentPoolsClientGetOptions) (AgentPoolsClientGetResponse, error)
Get - Get properties of the provided Kubernetes cluster agent pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- agentPoolName - The name of the Kubernetes cluster agent pool.
- options - AgentPoolsClientGetOptions contains the optional parameters for the AgentPoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/AgentPools_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAgentPoolsClient().Get(ctx, "resourceGroupName", "kubernetesClusterName", "agentPoolName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentPool = armnetworkcloud.AgentPool{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/agentPools"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.AgentPoolProperties{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // ProvisioningState: to.Ptr(armnetworkcloud.AgentPoolProvisioningStateSucceeded), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // } }
Output:
func (*AgentPoolsClient) NewListByKubernetesClusterPager ¶ added in v0.2.0
func (client *AgentPoolsClient) NewListByKubernetesClusterPager(resourceGroupName string, kubernetesClusterName string, options *AgentPoolsClientListByKubernetesClusterOptions) *runtime.Pager[AgentPoolsClientListByKubernetesClusterResponse]
NewListByKubernetesClusterPager - Get a list of agent pools for the provided Kubernetes cluster.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- options - AgentPoolsClientListByKubernetesClusterOptions contains the optional parameters for the AgentPoolsClient.NewListByKubernetesClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/AgentPools_ListByKubernetesCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAgentPoolsClient().NewListByKubernetesClusterPager("resourceGroupName", "kubernetesClusterName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AgentPoolList = armnetworkcloud.AgentPoolList{ // Value: []*armnetworkcloud.AgentPool{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/agentPools"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.AgentPoolProperties{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // DetailedStatus: to.Ptr(armnetworkcloud.AgentPoolDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Agent pool is available"), // KubernetesVersion: to.Ptr("1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // ProvisioningState: to.Ptr(armnetworkcloud.AgentPoolProvisioningStateSucceeded), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // }}, // } } }
Output:
type AgentPoolsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type AgentPoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AgentPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the AgentPoolsClient.BeginCreateOrUpdate method.
type AgentPoolsClientBeginDeleteOptions ¶ added in v0.2.0
type AgentPoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AgentPoolsClientBeginDeleteOptions contains the optional parameters for the AgentPoolsClient.BeginDelete method.
type AgentPoolsClientBeginUpdateOptions ¶ added in v0.2.0
type AgentPoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AgentPoolsClientBeginUpdateOptions contains the optional parameters for the AgentPoolsClient.BeginUpdate method.
type AgentPoolsClientCreateOrUpdateResponse ¶ added in v0.2.0
type AgentPoolsClientCreateOrUpdateResponse struct { // AgentPool represents the agent pool of Kubernetes cluster. AgentPool }
AgentPoolsClientCreateOrUpdateResponse contains the response from method AgentPoolsClient.BeginCreateOrUpdate.
type AgentPoolsClientDeleteResponse ¶ added in v0.2.0
type AgentPoolsClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
AgentPoolsClientDeleteResponse contains the response from method AgentPoolsClient.BeginDelete.
type AgentPoolsClientGetOptions ¶ added in v0.2.0
type AgentPoolsClientGetOptions struct { }
AgentPoolsClientGetOptions contains the optional parameters for the AgentPoolsClient.Get method.
type AgentPoolsClientGetResponse ¶ added in v0.2.0
type AgentPoolsClientGetResponse struct { // AgentPool represents the agent pool of Kubernetes cluster. AgentPool }
AgentPoolsClientGetResponse contains the response from method AgentPoolsClient.Get.
type AgentPoolsClientListByKubernetesClusterOptions ¶ added in v0.2.0
type AgentPoolsClientListByKubernetesClusterOptions struct { }
AgentPoolsClientListByKubernetesClusterOptions contains the optional parameters for the AgentPoolsClient.NewListByKubernetesClusterPager method.
type AgentPoolsClientListByKubernetesClusterResponse ¶ added in v0.2.0
type AgentPoolsClientListByKubernetesClusterResponse struct { // AgentPoolList represents a list of Kubernetes cluster agent pools. AgentPoolList }
AgentPoolsClientListByKubernetesClusterResponse contains the response from method AgentPoolsClient.NewListByKubernetesClusterPager.
type AgentPoolsClientUpdateResponse ¶ added in v0.2.0
type AgentPoolsClientUpdateResponse struct { // AgentPool represents the agent pool of Kubernetes cluster. AgentPool }
AgentPoolsClientUpdateResponse contains the response from method AgentPoolsClient.BeginUpdate.
type AttachedNetworkConfiguration ¶ added in v0.2.0
type AttachedNetworkConfiguration struct { // The list of Layer 2 Networks and related configuration for attachment. L2Networks []*L2NetworkAttachmentConfiguration // The list of Layer 3 Networks and related configuration for attachment. L3Networks []*L3NetworkAttachmentConfiguration // The list of Trunked Networks and related configuration for attachment. TrunkedNetworks []*TrunkedNetworkAttachmentConfiguration }
AttachedNetworkConfiguration represents the set of workload networks to attach to a resource.
func (AttachedNetworkConfiguration) MarshalJSON ¶ added in v0.2.0
func (a AttachedNetworkConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AttachedNetworkConfiguration.
func (*AttachedNetworkConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (a *AttachedNetworkConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AttachedNetworkConfiguration.
type AvailabilityLifecycle ¶ added in v0.2.0
type AvailabilityLifecycle string
AvailabilityLifecycle - The version lifecycle indicator.
const ( AvailabilityLifecycleGenerallyAvailable AvailabilityLifecycle = "GenerallyAvailable" AvailabilityLifecyclePreview AvailabilityLifecycle = "Preview" )
func PossibleAvailabilityLifecycleValues ¶ added in v0.2.0
func PossibleAvailabilityLifecycleValues() []AvailabilityLifecycle
PossibleAvailabilityLifecycleValues returns the possible values for the AvailabilityLifecycle const type.
type AvailableUpgrade ¶ added in v0.2.0
type AvailableUpgrade struct { // READ-ONLY; The version lifecycle indicator. AvailabilityLifecycle *AvailabilityLifecycle // READ-ONLY; The version available for upgrading. Version *string }
AvailableUpgrade represents an upgrade available for a Kubernetes cluster.
func (AvailableUpgrade) MarshalJSON ¶ added in v0.2.0
func (a AvailableUpgrade) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableUpgrade.
func (*AvailableUpgrade) UnmarshalJSON ¶ added in v0.2.0
func (a *AvailableUpgrade) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableUpgrade.
type BareMetalMachine ¶
type BareMetalMachine struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *BareMetalMachineProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
BareMetalMachine represents the physical machine in the rack.
func (BareMetalMachine) MarshalJSON ¶
func (b BareMetalMachine) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachine.
func (*BareMetalMachine) UnmarshalJSON ¶
func (b *BareMetalMachine) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachine.
type BareMetalMachineCommandSpecification ¶
type BareMetalMachineCommandSpecification struct { // REQUIRED; The command to execute against the bare metal machine. Command *string // The list of string arguments that will be passed to the script in order as separate arguments. Arguments []*string }
BareMetalMachineCommandSpecification represents the command and optional arguments to exercise against the bare metal machine.
func (BareMetalMachineCommandSpecification) MarshalJSON ¶
func (b BareMetalMachineCommandSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineCommandSpecification.
func (*BareMetalMachineCommandSpecification) UnmarshalJSON ¶
func (b *BareMetalMachineCommandSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineCommandSpecification.
type BareMetalMachineConfigurationData ¶
type BareMetalMachineConfigurationData struct { // REQUIRED; The credentials of the baseboard management controller on this bare metal machine. BmcCredentials *AdministrativeCredentials // REQUIRED; The MAC address of the BMC for this machine. BmcMacAddress *string // REQUIRED; The MAC address associated with the PXE NIC card. BootMacAddress *string // REQUIRED; The slot the physical machine is in the rack based on the BOM configuration. RackSlot *int64 // REQUIRED; The serial number of the machine. Hardware suppliers may use an alternate value. For example, service tag. SerialNumber *string // The free-form additional information about the machine, e.g. an asset tag. MachineDetails *string // The user-provided name for the bare metal machine created from this specification. If not provided, the machine name will // be generated programmatically. MachineName *string // READ-ONLY; The connection string for the baseboard management controller including IP address and protocol. BmcConnectionString *string }
BareMetalMachineConfigurationData represents configuration for the bare metal machine.
func (BareMetalMachineConfigurationData) MarshalJSON ¶
func (b BareMetalMachineConfigurationData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineConfigurationData.
func (*BareMetalMachineConfigurationData) UnmarshalJSON ¶
func (b *BareMetalMachineConfigurationData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineConfigurationData.
type BareMetalMachineCordonParameters ¶
type BareMetalMachineCordonParameters struct { // The indicator of whether to evacuate the node workload when the bare metal machine is cordoned. Evacuate *BareMetalMachineEvacuate }
BareMetalMachineCordonParameters represents the body of the request to evacuate workloads from node on a bare metal machine.
func (BareMetalMachineCordonParameters) MarshalJSON ¶
func (b BareMetalMachineCordonParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineCordonParameters.
func (*BareMetalMachineCordonParameters) UnmarshalJSON ¶
func (b *BareMetalMachineCordonParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineCordonParameters.
type BareMetalMachineCordonStatus ¶
type BareMetalMachineCordonStatus string
BareMetalMachineCordonStatus - The cordon status of the bare metal machine.
const ( BareMetalMachineCordonStatusCordoned BareMetalMachineCordonStatus = "Cordoned" BareMetalMachineCordonStatusUncordoned BareMetalMachineCordonStatus = "Uncordoned" )
func PossibleBareMetalMachineCordonStatusValues ¶
func PossibleBareMetalMachineCordonStatusValues() []BareMetalMachineCordonStatus
PossibleBareMetalMachineCordonStatusValues returns the possible values for the BareMetalMachineCordonStatus const type.
type BareMetalMachineDetailedStatus ¶
type BareMetalMachineDetailedStatus string
BareMetalMachineDetailedStatus - The more detailed status of the bare metal machine.
const ( BareMetalMachineDetailedStatusAvailable BareMetalMachineDetailedStatus = "Available" BareMetalMachineDetailedStatusDeprovisioning BareMetalMachineDetailedStatus = "Deprovisioning" BareMetalMachineDetailedStatusError BareMetalMachineDetailedStatus = "Error" BareMetalMachineDetailedStatusPreparing BareMetalMachineDetailedStatus = "Preparing" BareMetalMachineDetailedStatusProvisioned BareMetalMachineDetailedStatus = "Provisioned" BareMetalMachineDetailedStatusProvisioning BareMetalMachineDetailedStatus = "Provisioning" )
func PossibleBareMetalMachineDetailedStatusValues ¶
func PossibleBareMetalMachineDetailedStatusValues() []BareMetalMachineDetailedStatus
PossibleBareMetalMachineDetailedStatusValues returns the possible values for the BareMetalMachineDetailedStatus const type.
type BareMetalMachineEvacuate ¶
type BareMetalMachineEvacuate string
BareMetalMachineEvacuate - The indicator of whether to evacuate the node workload when the bare metal machine is cordoned.
const ( BareMetalMachineEvacuateFalse BareMetalMachineEvacuate = "False" BareMetalMachineEvacuateTrue BareMetalMachineEvacuate = "True" )
func PossibleBareMetalMachineEvacuateValues ¶
func PossibleBareMetalMachineEvacuateValues() []BareMetalMachineEvacuate
PossibleBareMetalMachineEvacuateValues returns the possible values for the BareMetalMachineEvacuate const type.
type BareMetalMachineHardwareValidationResult ¶
type BareMetalMachineHardwareValidationResult string
BareMetalMachineHardwareValidationResult - The outcome of the hardware validation.
const ( BareMetalMachineHardwareValidationResultFail BareMetalMachineHardwareValidationResult = "Fail" BareMetalMachineHardwareValidationResultPass BareMetalMachineHardwareValidationResult = "Pass" )
func PossibleBareMetalMachineHardwareValidationResultValues ¶
func PossibleBareMetalMachineHardwareValidationResultValues() []BareMetalMachineHardwareValidationResult
PossibleBareMetalMachineHardwareValidationResultValues returns the possible values for the BareMetalMachineHardwareValidationResult const type.
type BareMetalMachineKeySet ¶
type BareMetalMachineKeySet struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *BareMetalMachineKeySetProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
BareMetalMachineKeySet represents the bare metal machine key set.
func (BareMetalMachineKeySet) MarshalJSON ¶
func (b BareMetalMachineKeySet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineKeySet.
func (*BareMetalMachineKeySet) UnmarshalJSON ¶
func (b *BareMetalMachineKeySet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineKeySet.
type BareMetalMachineKeySetDetailedStatus ¶
type BareMetalMachineKeySetDetailedStatus string
BareMetalMachineKeySetDetailedStatus - The more detailed status of the key set.
const ( BareMetalMachineKeySetDetailedStatusAllActive BareMetalMachineKeySetDetailedStatus = "AllActive" BareMetalMachineKeySetDetailedStatusAllInvalid BareMetalMachineKeySetDetailedStatus = "AllInvalid" BareMetalMachineKeySetDetailedStatusSomeInvalid BareMetalMachineKeySetDetailedStatus = "SomeInvalid" BareMetalMachineKeySetDetailedStatusValidating BareMetalMachineKeySetDetailedStatus = "Validating" )
func PossibleBareMetalMachineKeySetDetailedStatusValues ¶
func PossibleBareMetalMachineKeySetDetailedStatusValues() []BareMetalMachineKeySetDetailedStatus
PossibleBareMetalMachineKeySetDetailedStatusValues returns the possible values for the BareMetalMachineKeySetDetailedStatus const type.
type BareMetalMachineKeySetList ¶
type BareMetalMachineKeySetList struct { // The link used to get the next page of operations. NextLink *string // The list of bare metal machine key sets. Value []*BareMetalMachineKeySet }
BareMetalMachineKeySetList represents a list of bare metal machine key sets.
func (BareMetalMachineKeySetList) MarshalJSON ¶
func (b BareMetalMachineKeySetList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineKeySetList.
func (*BareMetalMachineKeySetList) UnmarshalJSON ¶
func (b *BareMetalMachineKeySetList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineKeySetList.
type BareMetalMachineKeySetPatchParameters ¶
type BareMetalMachineKeySetPatchParameters struct { // The list of the resource properties. Properties *BareMetalMachineKeySetPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
BareMetalMachineKeySetPatchParameters represents the body of the request to patch the bare metal machine key set.
func (BareMetalMachineKeySetPatchParameters) MarshalJSON ¶
func (b BareMetalMachineKeySetPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineKeySetPatchParameters.
func (*BareMetalMachineKeySetPatchParameters) UnmarshalJSON ¶
func (b *BareMetalMachineKeySetPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineKeySetPatchParameters.
type BareMetalMachineKeySetPatchProperties ¶
type BareMetalMachineKeySetPatchProperties struct { // The date and time after which the users in this key set will be removed from the bare metal machines. Expiration *time.Time // The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. JumpHostsAllowed []*string // The unique list of permitted users. UserList []*KeySetUser }
BareMetalMachineKeySetPatchProperties represents the properties of bare metal machine key set that can be patched.
func (BareMetalMachineKeySetPatchProperties) MarshalJSON ¶
func (b BareMetalMachineKeySetPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineKeySetPatchProperties.
func (*BareMetalMachineKeySetPatchProperties) UnmarshalJSON ¶
func (b *BareMetalMachineKeySetPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineKeySetPatchProperties.
type BareMetalMachineKeySetPrivilegeLevel ¶
type BareMetalMachineKeySetPrivilegeLevel string
BareMetalMachineKeySetPrivilegeLevel - The access level allowed for the users in this key set.
const ( BareMetalMachineKeySetPrivilegeLevelStandard BareMetalMachineKeySetPrivilegeLevel = "Standard" BareMetalMachineKeySetPrivilegeLevelSuperuser BareMetalMachineKeySetPrivilegeLevel = "Superuser" )
func PossibleBareMetalMachineKeySetPrivilegeLevelValues ¶
func PossibleBareMetalMachineKeySetPrivilegeLevelValues() []BareMetalMachineKeySetPrivilegeLevel
PossibleBareMetalMachineKeySetPrivilegeLevelValues returns the possible values for the BareMetalMachineKeySetPrivilegeLevel const type.
type BareMetalMachineKeySetProperties ¶
type BareMetalMachineKeySetProperties struct { // REQUIRED; The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. // Users that are not in the group will not have access. AzureGroupID *string // REQUIRED; The date and time after which the users in this key set will be removed from the bare metal machines. Expiration *time.Time // REQUIRED; The list of IP addresses of jump hosts with management network access from which a login will be allowed for // the users. JumpHostsAllowed []*string // REQUIRED; The access level allowed for the users in this key set. PrivilegeLevel *BareMetalMachineKeySetPrivilegeLevel // REQUIRED; The unique list of permitted users. UserList []*KeySetUser // The name of the group that users will be assigned to on the operating system of the machines. OSGroupName *string // READ-ONLY; The more detailed status of the key set. DetailedStatus *BareMetalMachineKeySetDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The last time this key set was validated. LastValidation *time.Time // READ-ONLY; The provisioning state of the bare metal machine key set. ProvisioningState *BareMetalMachineKeySetProvisioningState // READ-ONLY; The status evaluation of each user. UserListStatus []*KeySetUserStatus }
BareMetalMachineKeySetProperties represents the properties of bare metal machine key set.
func (BareMetalMachineKeySetProperties) MarshalJSON ¶
func (b BareMetalMachineKeySetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineKeySetProperties.
func (*BareMetalMachineKeySetProperties) UnmarshalJSON ¶
func (b *BareMetalMachineKeySetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineKeySetProperties.
type BareMetalMachineKeySetProvisioningState ¶
type BareMetalMachineKeySetProvisioningState string
BareMetalMachineKeySetProvisioningState - The provisioning state of the bare metal machine key set.
const ( BareMetalMachineKeySetProvisioningStateAccepted BareMetalMachineKeySetProvisioningState = "Accepted" BareMetalMachineKeySetProvisioningStateCanceled BareMetalMachineKeySetProvisioningState = "Canceled" BareMetalMachineKeySetProvisioningStateFailed BareMetalMachineKeySetProvisioningState = "Failed" BareMetalMachineKeySetProvisioningStateProvisioning BareMetalMachineKeySetProvisioningState = "Provisioning" BareMetalMachineKeySetProvisioningStateSucceeded BareMetalMachineKeySetProvisioningState = "Succeeded" )
func PossibleBareMetalMachineKeySetProvisioningStateValues ¶
func PossibleBareMetalMachineKeySetProvisioningStateValues() []BareMetalMachineKeySetProvisioningState
PossibleBareMetalMachineKeySetProvisioningStateValues returns the possible values for the BareMetalMachineKeySetProvisioningState const type.
type BareMetalMachineKeySetUserSetupStatus ¶
type BareMetalMachineKeySetUserSetupStatus string
BareMetalMachineKeySetUserSetupStatus - The indicator of whether the user is currently deployed for access.
const ( BareMetalMachineKeySetUserSetupStatusActive BareMetalMachineKeySetUserSetupStatus = "Active" BareMetalMachineKeySetUserSetupStatusInvalid BareMetalMachineKeySetUserSetupStatus = "Invalid" )
func PossibleBareMetalMachineKeySetUserSetupStatusValues ¶
func PossibleBareMetalMachineKeySetUserSetupStatusValues() []BareMetalMachineKeySetUserSetupStatus
PossibleBareMetalMachineKeySetUserSetupStatusValues returns the possible values for the BareMetalMachineKeySetUserSetupStatus const type.
type BareMetalMachineKeySetsClient ¶
type BareMetalMachineKeySetsClient struct {
// contains filtered or unexported fields
}
BareMetalMachineKeySetsClient contains the methods for the BareMetalMachineKeySets group. Don't use this type directly, use NewBareMetalMachineKeySetsClient() instead.
func NewBareMetalMachineKeySetsClient ¶
func NewBareMetalMachineKeySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BareMetalMachineKeySetsClient, error)
NewBareMetalMachineKeySetsClient creates a new instance of BareMetalMachineKeySetsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BareMetalMachineKeySetsClient) BeginCreateOrUpdate ¶
func (client *BareMetalMachineKeySetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, bareMetalMachineKeySetParameters BareMetalMachineKeySet, options *BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BareMetalMachineKeySetsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new bare metal machine key set or update the existing one for the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bareMetalMachineKeySetName - The name of the bare metal machine key set.
- bareMetalMachineKeySetParameters - The request body.
- options - BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions contains the optional parameters for the BareMetalMachineKeySetsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachineKeySets_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachineKeySetsClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterName", "bareMetalMachineKeySetName", armnetworkcloud.BareMetalMachineKeySet{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t }()), JumpHostsAllowed: []*string{ to.Ptr("192.0.2.1"), to.Ptr("192.0.2.5")}, OSGroupName: to.Ptr("standardAccessGroup"), PrivilegeLevel: to.Ptr(armnetworkcloud.BareMetalMachineKeySetPrivilegeLevelStandard), UserList: []*armnetworkcloud.KeySetUser{ { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userABC"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userXYZ"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BareMetalMachineKeySet = armnetworkcloud.BareMetalMachineKeySet{ // Name: to.Ptr("bareMetalMachineKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bareMetalMachineKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bareMetalMachineKeySets/bareMetalMachineKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), // to.Ptr("192.0.2.5")}, // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // OSGroupName: to.Ptr("standardAccessGroup"), // PrivilegeLevel: to.Ptr(armnetworkcloud.BareMetalMachineKeySetPrivilegeLevelStandard), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // } }
Output:
func (*BareMetalMachineKeySetsClient) BeginDelete ¶
func (client *BareMetalMachineKeySetsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, options *BareMetalMachineKeySetsClientBeginDeleteOptions) (*runtime.Poller[BareMetalMachineKeySetsClientDeleteResponse], error)
BeginDelete - Delete the bare metal machine key set of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bareMetalMachineKeySetName - The name of the bare metal machine key set.
- options - BareMetalMachineKeySetsClientBeginDeleteOptions contains the optional parameters for the BareMetalMachineKeySetsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachineKeySets_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachineKeySetsClient().BeginDelete(ctx, "resourceGroupName", "clusterName", "bareMetalMachineKeySetName", 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 (*BareMetalMachineKeySetsClient) BeginUpdate ¶
func (client *BareMetalMachineKeySetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, bareMetalMachineKeySetUpdateParameters BareMetalMachineKeySetPatchParameters, options *BareMetalMachineKeySetsClientBeginUpdateOptions) (*runtime.Poller[BareMetalMachineKeySetsClientUpdateResponse], error)
BeginUpdate - Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bareMetalMachineKeySetName - The name of the bare metal machine key set.
- bareMetalMachineKeySetUpdateParameters - The request body.
- options - BareMetalMachineKeySetsClientBeginUpdateOptions contains the optional parameters for the BareMetalMachineKeySetsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachineKeySets_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachineKeySetsClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", "bareMetalMachineKeySetName", armnetworkcloud.BareMetalMachineKeySetPatchParameters{ Properties: &armnetworkcloud.BareMetalMachineKeySetPatchProperties{ Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t }()), JumpHostsAllowed: []*string{ to.Ptr("192.0.2.1"), to.Ptr("192.0.2.5")}, UserList: []*armnetworkcloud.KeySetUser{ { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userABC"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userXYZ"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BareMetalMachineKeySet = armnetworkcloud.BareMetalMachineKeySet{ // Name: to.Ptr("bareMetalMachineKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bareMetalMachineKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bareMetalMachineKeySets/bareMetalMachineKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), // to.Ptr("192.0.2.5")}, // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // OSGroupName: to.Ptr("standardAccessGroup"), // PrivilegeLevel: to.Ptr(armnetworkcloud.BareMetalMachineKeySetPrivilegeLevelStandard), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // } }
Output:
func (*BareMetalMachineKeySetsClient) Get ¶
func (client *BareMetalMachineKeySetsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, bareMetalMachineKeySetName string, options *BareMetalMachineKeySetsClientGetOptions) (BareMetalMachineKeySetsClientGetResponse, error)
Get - Get bare metal machine key set of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bareMetalMachineKeySetName - The name of the bare metal machine key set.
- options - BareMetalMachineKeySetsClientGetOptions contains the optional parameters for the BareMetalMachineKeySetsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachineKeySets_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBareMetalMachineKeySetsClient().Get(ctx, "resourceGroupName", "clusterName", "bareMetalMachineKeySetName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BareMetalMachineKeySet = armnetworkcloud.BareMetalMachineKeySet{ // Name: to.Ptr("bareMetalMachineKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bareMetalMachineKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bareMetalMachineKeySets/bareMetalMachineKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), // to.Ptr("192.0.2.5")}, // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // OSGroupName: to.Ptr("standardAccessGroup"), // PrivilegeLevel: to.Ptr(armnetworkcloud.BareMetalMachineKeySetPrivilegeLevelStandard), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // } }
Output:
func (*BareMetalMachineKeySetsClient) NewListByClusterPager ¶ added in v0.2.0
func (client *BareMetalMachineKeySetsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *BareMetalMachineKeySetsClientListByClusterOptions) *runtime.Pager[BareMetalMachineKeySetsClientListByClusterResponse]
NewListByClusterPager - Get a list of bare metal machine key sets for the provided cluster.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - BareMetalMachineKeySetsClientListByClusterOptions contains the optional parameters for the BareMetalMachineKeySetsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachineKeySets_ListByCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBareMetalMachineKeySetsClient().NewListByClusterPager("resourceGroupName", "clusterName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.BareMetalMachineKeySetList = armnetworkcloud.BareMetalMachineKeySetList{ // Value: []*armnetworkcloud.BareMetalMachineKeySet{ // { // Name: to.Ptr("bareMetalMachineKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bareMetalMachineKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bareMetalMachineKeySets/bareMetalMachineKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // JumpHostsAllowed: []*string{ // to.Ptr("192.0.2.1"), // to.Ptr("192.0.2.5")}, // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // OSGroupName: to.Ptr("standardAccessGroup"), // PrivilegeLevel: to.Ptr(armnetworkcloud.BareMetalMachineKeySetPrivilegeLevelStandard), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // }}, // } } }
Output:
type BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions ¶
type BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachineKeySetsClientBeginCreateOrUpdateOptions contains the optional parameters for the BareMetalMachineKeySetsClient.BeginCreateOrUpdate method.
type BareMetalMachineKeySetsClientBeginDeleteOptions ¶
type BareMetalMachineKeySetsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachineKeySetsClientBeginDeleteOptions contains the optional parameters for the BareMetalMachineKeySetsClient.BeginDelete method.
type BareMetalMachineKeySetsClientBeginUpdateOptions ¶
type BareMetalMachineKeySetsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachineKeySetsClientBeginUpdateOptions contains the optional parameters for the BareMetalMachineKeySetsClient.BeginUpdate method.
type BareMetalMachineKeySetsClientCreateOrUpdateResponse ¶
type BareMetalMachineKeySetsClientCreateOrUpdateResponse struct { // BareMetalMachineKeySet represents the bare metal machine key set. BareMetalMachineKeySet }
BareMetalMachineKeySetsClientCreateOrUpdateResponse contains the response from method BareMetalMachineKeySetsClient.BeginCreateOrUpdate.
type BareMetalMachineKeySetsClientDeleteResponse ¶
type BareMetalMachineKeySetsClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachineKeySetsClientDeleteResponse contains the response from method BareMetalMachineKeySetsClient.BeginDelete.
type BareMetalMachineKeySetsClientGetOptions ¶
type BareMetalMachineKeySetsClientGetOptions struct { }
BareMetalMachineKeySetsClientGetOptions contains the optional parameters for the BareMetalMachineKeySetsClient.Get method.
type BareMetalMachineKeySetsClientGetResponse ¶
type BareMetalMachineKeySetsClientGetResponse struct { // BareMetalMachineKeySet represents the bare metal machine key set. BareMetalMachineKeySet }
BareMetalMachineKeySetsClientGetResponse contains the response from method BareMetalMachineKeySetsClient.Get.
type BareMetalMachineKeySetsClientListByClusterOptions ¶ added in v0.2.0
type BareMetalMachineKeySetsClientListByClusterOptions struct { }
BareMetalMachineKeySetsClientListByClusterOptions contains the optional parameters for the BareMetalMachineKeySetsClient.NewListByClusterPager method.
type BareMetalMachineKeySetsClientListByClusterResponse ¶ added in v0.2.0
type BareMetalMachineKeySetsClientListByClusterResponse struct { // BareMetalMachineKeySetList represents a list of bare metal machine key sets. BareMetalMachineKeySetList }
BareMetalMachineKeySetsClientListByClusterResponse contains the response from method BareMetalMachineKeySetsClient.NewListByClusterPager.
type BareMetalMachineKeySetsClientUpdateResponse ¶
type BareMetalMachineKeySetsClientUpdateResponse struct { // BareMetalMachineKeySet represents the bare metal machine key set. BareMetalMachineKeySet }
BareMetalMachineKeySetsClientUpdateResponse contains the response from method BareMetalMachineKeySetsClient.BeginUpdate.
type BareMetalMachineList ¶
type BareMetalMachineList struct { // The link used to get the next page of operations. NextLink *string // The list of bare metal machines. Value []*BareMetalMachine }
BareMetalMachineList represents a list of bare metal machines.
func (BareMetalMachineList) MarshalJSON ¶
func (b BareMetalMachineList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineList.
func (*BareMetalMachineList) UnmarshalJSON ¶
func (b *BareMetalMachineList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineList.
type BareMetalMachinePatchParameters ¶
type BareMetalMachinePatchParameters struct { // The list of the resource properties. Properties *BareMetalMachinePatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
BareMetalMachinePatchParameters represents the body of the request to patch bare metal machine properties.
func (BareMetalMachinePatchParameters) MarshalJSON ¶
func (b BareMetalMachinePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachinePatchParameters.
func (*BareMetalMachinePatchParameters) UnmarshalJSON ¶
func (b *BareMetalMachinePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachinePatchParameters.
type BareMetalMachinePatchProperties ¶
type BareMetalMachinePatchProperties struct { // The details provided by the customer during the creation of rack manifests that allows for custom data to be associated // with this machine. MachineDetails *string }
BareMetalMachinePatchProperties represents the properties of the bare metal machine that can be patched.
func (BareMetalMachinePatchProperties) MarshalJSON ¶
func (b BareMetalMachinePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachinePatchProperties.
func (*BareMetalMachinePatchProperties) UnmarshalJSON ¶
func (b *BareMetalMachinePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachinePatchProperties.
type BareMetalMachinePowerOffParameters ¶
type BareMetalMachinePowerOffParameters struct { // The indicator of whether to skip the graceful OS shutdown and power off the bare metal machine immediately. SkipShutdown *BareMetalMachineSkipShutdown }
BareMetalMachinePowerOffParameters represents the body of the request to power off bare metal machine.
func (BareMetalMachinePowerOffParameters) MarshalJSON ¶
func (b BareMetalMachinePowerOffParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachinePowerOffParameters.
func (*BareMetalMachinePowerOffParameters) UnmarshalJSON ¶
func (b *BareMetalMachinePowerOffParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachinePowerOffParameters.
type BareMetalMachinePowerState ¶
type BareMetalMachinePowerState string
BareMetalMachinePowerState - The power state derived from the baseboard management controller.
const ( BareMetalMachinePowerStateOff BareMetalMachinePowerState = "Off" BareMetalMachinePowerStateOn BareMetalMachinePowerState = "On" )
func PossibleBareMetalMachinePowerStateValues ¶
func PossibleBareMetalMachinePowerStateValues() []BareMetalMachinePowerState
PossibleBareMetalMachinePowerStateValues returns the possible values for the BareMetalMachinePowerState const type.
type BareMetalMachineProperties ¶
type BareMetalMachineProperties struct { // REQUIRED; The connection string for the baseboard management controller including IP address and protocol. BmcConnectionString *string // REQUIRED; The credentials of the baseboard management controller on this bare metal machine. BmcCredentials *AdministrativeCredentials // REQUIRED; The MAC address of the BMC device. BmcMacAddress *string // REQUIRED; The MAC address of a NIC connected to the PXE network. BootMacAddress *string // REQUIRED; The custom details provided by the customer. MachineDetails *string // REQUIRED; The OS-level hostname assigned to this machine. MachineName *string // REQUIRED; The unique internal identifier of the bare metal machine SKU. MachineSKUID *string // REQUIRED; The resource ID of the rack where this bare metal machine resides. RackID *string // REQUIRED; The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is // 1. RackSlot *int64 // REQUIRED; The serial number of the bare metal machine. SerialNumber *string // The cluster version that has been applied to this machine during deployment or a version update. MachineClusterVersion *string // READ-ONLY; The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. AssociatedResourceIDs []*string // READ-ONLY; The resource ID of the cluster this bare metal machine is associated with. ClusterID *string // READ-ONLY; The cordon status of the bare metal machine. CordonStatus *BareMetalMachineCordonStatus // READ-ONLY; The more detailed status of the bare metal machine. DetailedStatus *BareMetalMachineDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The hardware inventory, including information acquired from the model/sku information and from the ironic inspector. HardwareInventory *HardwareInventory // READ-ONLY; The details of the latest hardware validation performed for this bare metal machine. HardwareValidationStatus *HardwareValidationStatus // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the HybridAksClusters // that have nodes hosted on this bare metal machine. HybridAksClustersAssociatedIDs []*string // READ-ONLY; The name of this machine represented by the host object in the Cluster's Kubernetes control plane. KubernetesNodeName *string // READ-ONLY; The version of Kubernetes running on this machine. KubernetesVersion *string // READ-ONLY; The list of roles that are assigned to the cluster node running on this machine. MachineRoles []*string // READ-ONLY; The image that is currently provisioned to the OS disk. OSImage *string // READ-ONLY; The IPv4 address that is assigned to the bare metal machine during the cluster deployment. OamIPv4Address *string // READ-ONLY; The IPv6 address that is assigned to the bare metal machine during the cluster deployment. OamIPv6Address *string // READ-ONLY; The power state derived from the baseboard management controller. PowerState *BareMetalMachinePowerState // READ-ONLY; The provisioning state of the bare metal machine. ProvisioningState *BareMetalMachineProvisioningState // READ-ONLY; The indicator of whether the bare metal machine is ready to receive workloads. ReadyState *BareMetalMachineReadyState // READ-ONLY; The runtime protection status of the bare metal machine. RuntimeProtectionStatus *RuntimeProtectionStatus // READ-ONLY; The list of statuses that represent secret rotation activity. SecretRotationStatus []*SecretRotationStatus // READ-ONLY; The discovered value of the machine's service tag. ServiceTag *string // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the VirtualMachines that // are hosted on this bare metal machine. VirtualMachinesAssociatedIDs []*string }
BareMetalMachineProperties represents the properties of a bare metal machine.
func (BareMetalMachineProperties) MarshalJSON ¶
func (b BareMetalMachineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineProperties.
func (*BareMetalMachineProperties) UnmarshalJSON ¶
func (b *BareMetalMachineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineProperties.
type BareMetalMachineProvisioningState ¶
type BareMetalMachineProvisioningState string
BareMetalMachineProvisioningState - The provisioning state of the bare metal machine.
const ( BareMetalMachineProvisioningStateAccepted BareMetalMachineProvisioningState = "Accepted" BareMetalMachineProvisioningStateCanceled BareMetalMachineProvisioningState = "Canceled" BareMetalMachineProvisioningStateFailed BareMetalMachineProvisioningState = "Failed" BareMetalMachineProvisioningStateProvisioning BareMetalMachineProvisioningState = "Provisioning" BareMetalMachineProvisioningStateSucceeded BareMetalMachineProvisioningState = "Succeeded" )
func PossibleBareMetalMachineProvisioningStateValues ¶
func PossibleBareMetalMachineProvisioningStateValues() []BareMetalMachineProvisioningState
PossibleBareMetalMachineProvisioningStateValues returns the possible values for the BareMetalMachineProvisioningState const type.
type BareMetalMachineReadyState ¶
type BareMetalMachineReadyState string
BareMetalMachineReadyState - The indicator of whether the bare metal machine is ready to receive workloads.
const ( BareMetalMachineReadyStateFalse BareMetalMachineReadyState = "False" BareMetalMachineReadyStateTrue BareMetalMachineReadyState = "True" )
func PossibleBareMetalMachineReadyStateValues ¶
func PossibleBareMetalMachineReadyStateValues() []BareMetalMachineReadyState
PossibleBareMetalMachineReadyStateValues returns the possible values for the BareMetalMachineReadyState const type.
type BareMetalMachineReplaceParameters ¶
type BareMetalMachineReplaceParameters struct { // The credentials of the baseboard management controller on this bare metal machine. BmcCredentials *AdministrativeCredentials // The MAC address of the BMC device. BmcMacAddress *string // The MAC address of a NIC connected to the PXE network. BootMacAddress *string // The OS-level hostname assigned to this machine. MachineName *string // The serial number of the bare metal machine. SerialNumber *string }
BareMetalMachineReplaceParameters represents the body of the request to physically swap a bare metal machine for another.
func (BareMetalMachineReplaceParameters) MarshalJSON ¶
func (b BareMetalMachineReplaceParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineReplaceParameters.
func (*BareMetalMachineReplaceParameters) UnmarshalJSON ¶
func (b *BareMetalMachineReplaceParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineReplaceParameters.
type BareMetalMachineRunCommandParameters ¶
type BareMetalMachineRunCommandParameters struct { // REQUIRED; The maximum time the script is allowed to run. If the execution time exceeds the maximum, the script will be // stopped, any output produced until then will be captured, and the exit code matching a // timeout will be returned (252). LimitTimeSeconds *int64 // REQUIRED; The base64 encoded script to execute on the bare metal machine. Script *string // The list of string arguments that will be passed to the script in order as separate arguments. Arguments []*string }
BareMetalMachineRunCommandParameters represents the body of the request to execute a script on the bare metal machine.
func (BareMetalMachineRunCommandParameters) MarshalJSON ¶
func (b BareMetalMachineRunCommandParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineRunCommandParameters.
func (*BareMetalMachineRunCommandParameters) UnmarshalJSON ¶
func (b *BareMetalMachineRunCommandParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineRunCommandParameters.
type BareMetalMachineRunDataExtractsParameters ¶
type BareMetalMachineRunDataExtractsParameters struct { // REQUIRED; The list of curated data extraction commands to be executed directly against the target machine. Commands []*BareMetalMachineCommandSpecification // REQUIRED; The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will // be stopped, any output produced until then will be captured, and the exit code matching a // timeout will be returned (252). LimitTimeSeconds *int64 }
BareMetalMachineRunDataExtractsParameters represents the body of request containing list of curated data extraction commands to run on the bare metal machine.
func (BareMetalMachineRunDataExtractsParameters) MarshalJSON ¶
func (b BareMetalMachineRunDataExtractsParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineRunDataExtractsParameters.
func (*BareMetalMachineRunDataExtractsParameters) UnmarshalJSON ¶
func (b *BareMetalMachineRunDataExtractsParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineRunDataExtractsParameters.
type BareMetalMachineRunReadCommandsParameters ¶
type BareMetalMachineRunReadCommandsParameters struct { // REQUIRED; The list of read-only commands to be executed directly against the target machine. Commands []*BareMetalMachineCommandSpecification // REQUIRED; The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will // be stopped, any output produced until then will be captured, and the exit code matching a // timeout will be returned (252). LimitTimeSeconds *int64 }
BareMetalMachineRunReadCommandsParameters represents the body of request containing list of read-only commands to run on the bare metal machine.
func (BareMetalMachineRunReadCommandsParameters) MarshalJSON ¶
func (b BareMetalMachineRunReadCommandsParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BareMetalMachineRunReadCommandsParameters.
func (*BareMetalMachineRunReadCommandsParameters) UnmarshalJSON ¶
func (b *BareMetalMachineRunReadCommandsParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BareMetalMachineRunReadCommandsParameters.
type BareMetalMachineSkipShutdown ¶
type BareMetalMachineSkipShutdown string
BareMetalMachineSkipShutdown - The indicator of whether to skip the graceful OS shutdown and power off the bare metal machine immediately.
const ( BareMetalMachineSkipShutdownFalse BareMetalMachineSkipShutdown = "False" BareMetalMachineSkipShutdownTrue BareMetalMachineSkipShutdown = "True" )
func PossibleBareMetalMachineSkipShutdownValues ¶
func PossibleBareMetalMachineSkipShutdownValues() []BareMetalMachineSkipShutdown
PossibleBareMetalMachineSkipShutdownValues returns the possible values for the BareMetalMachineSkipShutdown const type.
type BareMetalMachinesClient ¶
type BareMetalMachinesClient struct {
// contains filtered or unexported fields
}
BareMetalMachinesClient contains the methods for the BareMetalMachines group. Don't use this type directly, use NewBareMetalMachinesClient() instead.
func NewBareMetalMachinesClient ¶
func NewBareMetalMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BareMetalMachinesClient, error)
NewBareMetalMachinesClient creates a new instance of BareMetalMachinesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BareMetalMachinesClient) BeginCordon ¶
func (client *BareMetalMachinesClient) BeginCordon(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginCordonOptions) (*runtime.Poller[BareMetalMachinesClientCordonResponse], error)
BeginCordon - Cordon the provided bare metal machine's Kubernetes node. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginCordonOptions contains the optional parameters for the BareMetalMachinesClient.BeginCordon method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Cordon.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginCordon(ctx, "resourceGroupName", "bareMetalMachineName", &armnetworkcloud.BareMetalMachinesClientBeginCordonOptions{BareMetalMachineCordonParameters: &armnetworkcloud.BareMetalMachineCordonParameters{ Evacuate: to.Ptr(armnetworkcloud.BareMetalMachineEvacuateTrue), }, }) 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 (*BareMetalMachinesClient) BeginCreateOrUpdate ¶
func (client *BareMetalMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineParameters BareMetalMachine, options *BareMetalMachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BareMetalMachinesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- bareMetalMachineParameters - The request body.
- options - BareMetalMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the BareMetalMachinesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "bareMetalMachineName", armnetworkcloud.BareMetalMachine{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.BareMetalMachineProperties{ BmcConnectionString: to.Ptr("bmcconnectionstring"), BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("bmcuser"), }, BmcMacAddress: to.Ptr("00:00:4f:00:57:00"), BootMacAddress: to.Ptr("00:00:4e:00:58:af"), MachineDetails: to.Ptr("User-provided machine details."), MachineName: to.Ptr("r01c001"), MachineSKUID: to.Ptr("684E-3B16-399E"), RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BareMetalMachine = armnetworkcloud.BareMetalMachine{ // Name: to.Ptr("bareMetalMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/bareMetalMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // BmcConnectionString: to.Ptr("bmcconnectionstring"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("bmcuser"), // }, // BmcMacAddress: to.Ptr("00:00:4f:00:57:00"), // BootMacAddress: to.Ptr("00:00:4e:00:58:af"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CordonStatus: to.Ptr(armnetworkcloud.BareMetalMachineCordonStatusUncordoned), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("DetailedStatusMessage"), // HardwareInventory: &armnetworkcloud.HardwareInventory{ // AdditionalHostInformation: to.Ptr("Machine specific information..."), // Interfaces: []*armnetworkcloud.HardwareInventoryNetworkInterface{ // { // Name: to.Ptr("networkInterfaceName"), // LinkStatus: to.Ptr("Up"), // MacAddress: to.Ptr("2C:54:91:88:C9:E3"), // NetworkInterfaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkDevices/networkDeviceName/networkInterfaces/networkInterfaceName"), // }}, // }, // HardwareValidationStatus: &armnetworkcloud.HardwareValidationStatus{ // LastValidationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T13:27:03.008Z"); return t}()), // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), // KubernetesVersion: to.Ptr("1.28.3"), // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), // MachineRoles: []*string{ // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, // MachineSKUID: to.Ptr("684E-3B16-399E"), // OamIPv4Address: to.Ptr("192.0.2.1"), // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), // OSImage: to.Ptr("v20220805e"), // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), // DefinitionsVersion: to.Ptr("1.2.3"), // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), // }, // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Bare Metal Machine Identity - console"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // ServiceTag: to.Ptr("ST1219XXX"), // }, // } }
Output:
func (*BareMetalMachinesClient) BeginDelete ¶
func (client *BareMetalMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginDeleteOptions) (*runtime.Poller[BareMetalMachinesClientDeleteResponse], error)
BeginDelete - Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginDeleteOptions contains the optional parameters for the BareMetalMachinesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginDelete(ctx, "resourceGroupName", "bareMetalMachineName", 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 (*BareMetalMachinesClient) BeginPowerOff ¶
func (client *BareMetalMachinesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginPowerOffOptions) (*runtime.Poller[BareMetalMachinesClientPowerOffResponse], error)
BeginPowerOff - Power off the provided bare metal machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginPowerOffOptions contains the optional parameters for the BareMetalMachinesClient.BeginPowerOff method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_PowerOff.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginPowerOff(ctx, "resourceGroupName", "bareMetalMachineName", &armnetworkcloud.BareMetalMachinesClientBeginPowerOffOptions{BareMetalMachinePowerOffParameters: &armnetworkcloud.BareMetalMachinePowerOffParameters{ SkipShutdown: to.Ptr(armnetworkcloud.BareMetalMachineSkipShutdownTrue), }, }) 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 (*BareMetalMachinesClient) BeginReimage ¶
func (client *BareMetalMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginReimageOptions) (*runtime.Poller[BareMetalMachinesClientReimageResponse], error)
BeginReimage - Reimage the provided bare metal machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginReimageOptions contains the optional parameters for the BareMetalMachinesClient.BeginReimage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Reimage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginReimage(ctx, "resourceGroupName", "bareMetalMachineName", 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 (*BareMetalMachinesClient) BeginReplace ¶
func (client *BareMetalMachinesClient) BeginReplace(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginReplaceOptions) (*runtime.Poller[BareMetalMachinesClientReplaceResponse], error)
BeginReplace - Replace the provided bare metal machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginReplaceOptions contains the optional parameters for the BareMetalMachinesClient.BeginReplace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Replace.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginReplace(ctx, "resourceGroupName", "bareMetalMachineName", &armnetworkcloud.BareMetalMachinesClientBeginReplaceOptions{BareMetalMachineReplaceParameters: &armnetworkcloud.BareMetalMachineReplaceParameters{ BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("bmcuser"), }, BmcMacAddress: to.Ptr("00:00:4f:00:57:ad"), BootMacAddress: to.Ptr("00:00:4e:00:58:af"), MachineName: to.Ptr("name"), SerialNumber: to.Ptr("BM1219XXX"), }, }) 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 (*BareMetalMachinesClient) BeginRestart ¶
func (client *BareMetalMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginRestartOptions) (*runtime.Poller[BareMetalMachinesClientRestartResponse], error)
BeginRestart - Restart the provided bare metal machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginRestartOptions contains the optional parameters for the BareMetalMachinesClient.BeginRestart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Restart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginRestart(ctx, "resourceGroupName", "bareMetalMachineName", 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 (*BareMetalMachinesClient) BeginRunCommand ¶
func (client *BareMetalMachinesClient) BeginRunCommand(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunCommandParameters BareMetalMachineRunCommandParameters, options *BareMetalMachinesClientBeginRunCommandOptions) (*runtime.Poller[BareMetalMachinesClientRunCommandResponse], error)
BeginRunCommand - Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- bareMetalMachineRunCommandParameters - The request body.
- options - BareMetalMachinesClientBeginRunCommandOptions contains the optional parameters for the BareMetalMachinesClient.BeginRunCommand method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_RunCommand.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginRunCommand(ctx, "resourceGroupName", "bareMetalMachineName", armnetworkcloud.BareMetalMachineRunCommandParameters{ Arguments: []*string{ to.Ptr("--argument1"), to.Ptr("argument2")}, LimitTimeSeconds: to.Ptr[int64](60), Script: to.Ptr("cHdkCg=="), }, 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 (*BareMetalMachinesClient) BeginRunDataExtracts ¶
func (client *BareMetalMachinesClient) BeginRunDataExtracts(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunDataExtractsParameters BareMetalMachineRunDataExtractsParameters, options *BareMetalMachinesClientBeginRunDataExtractsOptions) (*runtime.Poller[BareMetalMachinesClientRunDataExtractsResponse], error)
BeginRunDataExtracts - Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- bareMetalMachineRunDataExtractsParameters - The request body.
- options - BareMetalMachinesClientBeginRunDataExtractsOptions contains the optional parameters for the BareMetalMachinesClient.BeginRunDataExtracts method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_RunDataExtracts.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginRunDataExtracts(ctx, "resourceGroupName", "bareMetalMachineName", armnetworkcloud.BareMetalMachineRunDataExtractsParameters{ LimitTimeSeconds: to.Ptr[int64](60), Commands: []*armnetworkcloud.BareMetalMachineCommandSpecification{ { Arguments: []*string{ to.Ptr("SysInfo"), to.Ptr("TTYLog")}, Command: to.Ptr("hardware-support-data-collection"), }}, }, 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 (*BareMetalMachinesClient) BeginRunReadCommands ¶
func (client *BareMetalMachinesClient) BeginRunReadCommands(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineRunReadCommandsParameters BareMetalMachineRunReadCommandsParameters, options *BareMetalMachinesClientBeginRunReadCommandsOptions) (*runtime.Poller[BareMetalMachinesClientRunReadCommandsResponse], error)
BeginRunReadCommands - Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- bareMetalMachineRunReadCommandsParameters - The request body.
- options - BareMetalMachinesClientBeginRunReadCommandsOptions contains the optional parameters for the BareMetalMachinesClient.BeginRunReadCommands method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_RunReadCommands.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginRunReadCommands(ctx, "resourceGroupName", "bareMetalMachineName", armnetworkcloud.BareMetalMachineRunReadCommandsParameters{ LimitTimeSeconds: to.Ptr[int64](60), Commands: []*armnetworkcloud.BareMetalMachineCommandSpecification{ { Arguments: []*string{ to.Ptr("pods"), to.Ptr("-A")}, Command: to.Ptr("kubectl get"), }, { Arguments: []*string{ to.Ptr("192.168.0.99"), to.Ptr("-c"), to.Ptr("3")}, Command: to.Ptr("ping"), }}, }, 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 (*BareMetalMachinesClient) BeginStart ¶
func (client *BareMetalMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginStartOptions) (*runtime.Poller[BareMetalMachinesClientStartResponse], error)
BeginStart - Start the provided bare metal machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginStartOptions contains the optional parameters for the BareMetalMachinesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Start.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginStart(ctx, "resourceGroupName", "bareMetalMachineName", 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 (*BareMetalMachinesClient) BeginUncordon ¶
func (client *BareMetalMachinesClient) BeginUncordon(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientBeginUncordonOptions) (*runtime.Poller[BareMetalMachinesClientUncordonResponse], error)
BeginUncordon - Uncordon the provided bare metal machine's Kubernetes node. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientBeginUncordonOptions contains the optional parameters for the BareMetalMachinesClient.BeginUncordon method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Uncordon.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginUncordon(ctx, "resourceGroupName", "bareMetalMachineName", 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 (*BareMetalMachinesClient) BeginUpdate ¶
func (client *BareMetalMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, bareMetalMachineName string, bareMetalMachineUpdateParameters BareMetalMachinePatchParameters, options *BareMetalMachinesClientBeginUpdateOptions) (*runtime.Poller[BareMetalMachinesClientUpdateResponse], error)
BeginUpdate - Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- bareMetalMachineUpdateParameters - The request body.
- options - BareMetalMachinesClientBeginUpdateOptions contains the optional parameters for the BareMetalMachinesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBareMetalMachinesClient().BeginUpdate(ctx, "resourceGroupName", "bareMetalMachineName", armnetworkcloud.BareMetalMachinePatchParameters{ Properties: &armnetworkcloud.BareMetalMachinePatchProperties{ MachineDetails: to.Ptr("machinedetails"), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BareMetalMachine = armnetworkcloud.BareMetalMachine{ // Name: to.Ptr("bareMetalMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/bareMetalMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // BmcConnectionString: to.Ptr("bmcconnectionstring"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("bmcuser"), // }, // BmcMacAddress: to.Ptr("00:00:4f:00:57:00"), // BootMacAddress: to.Ptr("00:00:4e:00:58:af"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CordonStatus: to.Ptr(armnetworkcloud.BareMetalMachineCordonStatusUncordoned), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("DetailedStatusMessage"), // HardwareInventory: &armnetworkcloud.HardwareInventory{ // AdditionalHostInformation: to.Ptr("Machine specific information..."), // Interfaces: []*armnetworkcloud.HardwareInventoryNetworkInterface{ // { // Name: to.Ptr("networkInterfaceName"), // LinkStatus: to.Ptr("Up"), // MacAddress: to.Ptr("2C:54:91:88:C9:E3"), // NetworkInterfaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkDevices/networkDeviceName/networkInterfaces/networkInterfaceName"), // }}, // }, // HardwareValidationStatus: &armnetworkcloud.HardwareValidationStatus{ // LastValidationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T13:27:03.008Z"); return t}()), // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), // KubernetesVersion: to.Ptr("1.28.3"), // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), // MachineRoles: []*string{ // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, // MachineSKUID: to.Ptr("684E-3B16-399E"), // OamIPv4Address: to.Ptr("192.0.2.1"), // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), // OSImage: to.Ptr("v20220805e"), // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), // DefinitionsVersion: to.Ptr("1.2.3"), // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), // }, // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Bare Metal Machine Identity - console"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // ServiceTag: to.Ptr("ST1219XXX"), // }, // } }
Output:
func (*BareMetalMachinesClient) Get ¶
func (client *BareMetalMachinesClient) Get(ctx context.Context, resourceGroupName string, bareMetalMachineName string, options *BareMetalMachinesClientGetOptions) (BareMetalMachinesClientGetResponse, error)
Get - Get properties of the provided bare metal machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- bareMetalMachineName - The name of the bare metal machine.
- options - BareMetalMachinesClientGetOptions contains the optional parameters for the BareMetalMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBareMetalMachinesClient().Get(ctx, "resourceGroupName", "bareMetalMachineName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BareMetalMachine = armnetworkcloud.BareMetalMachine{ // Name: to.Ptr("bareMetalMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/bareMetalMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // BmcConnectionString: to.Ptr("bmcconnectionstring"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("bmcuser"), // }, // BmcMacAddress: to.Ptr("00:00:4f:00:57:00"), // BootMacAddress: to.Ptr("00:00:4e:00:58:af"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CordonStatus: to.Ptr(armnetworkcloud.BareMetalMachineCordonStatusUncordoned), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("DetailedStatusMessage"), // HardwareInventory: &armnetworkcloud.HardwareInventory{ // AdditionalHostInformation: to.Ptr("Machine specific information..."), // Interfaces: []*armnetworkcloud.HardwareInventoryNetworkInterface{ // { // Name: to.Ptr("networkInterfaceName"), // LinkStatus: to.Ptr("Up"), // MacAddress: to.Ptr("2C:54:91:88:C9:E3"), // NetworkInterfaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkDevices/networkDeviceName/networkInterfaces/networkInterfaceName"), // }}, // }, // HardwareValidationStatus: &armnetworkcloud.HardwareValidationStatus{ // LastValidationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T13:27:03.008Z"); return t}()), // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), // KubernetesVersion: to.Ptr("1.28.3"), // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), // MachineRoles: []*string{ // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, // MachineSKUID: to.Ptr("684E-3B16-399E"), // OamIPv4Address: to.Ptr("192.0.2.1"), // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), // OSImage: to.Ptr("v20220805e"), // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), // DefinitionsVersion: to.Ptr("1.2.3"), // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), // }, // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Bare Metal Machine Identity - console"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // ServiceTag: to.Ptr("ST1219XXX"), // }, // } }
Output:
func (*BareMetalMachinesClient) NewListByResourceGroupPager ¶
func (client *BareMetalMachinesClient) NewListByResourceGroupPager(resourceGroupName string, options *BareMetalMachinesClientListByResourceGroupOptions) *runtime.Pager[BareMetalMachinesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of bare metal machines in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - BareMetalMachinesClientListByResourceGroupOptions contains the optional parameters for the BareMetalMachinesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBareMetalMachinesClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.BareMetalMachineList = armnetworkcloud.BareMetalMachineList{ // Value: []*armnetworkcloud.BareMetalMachine{ // { // Name: to.Ptr("bareMetalMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/bareMetalMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // BmcConnectionString: to.Ptr("bmcconnectionstring"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("bmcuser"), // }, // BmcMacAddress: to.Ptr("00:00:4f:00:57:00"), // BootMacAddress: to.Ptr("00:00:4e:00:58:af"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CordonStatus: to.Ptr(armnetworkcloud.BareMetalMachineCordonStatusUncordoned), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("DetailedStatusMessage"), // HardwareInventory: &armnetworkcloud.HardwareInventory{ // AdditionalHostInformation: to.Ptr("Machine specific information..."), // Interfaces: []*armnetworkcloud.HardwareInventoryNetworkInterface{ // { // Name: to.Ptr("networkInterfaceName"), // LinkStatus: to.Ptr("Up"), // MacAddress: to.Ptr("2C:54:91:88:C9:E3"), // NetworkInterfaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkDevices/networkDeviceName/networkInterfaces/networkInterfaceName"), // }}, // }, // HardwareValidationStatus: &armnetworkcloud.HardwareValidationStatus{ // LastValidationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T13:27:03.008Z"); return t}()), // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), // KubernetesVersion: to.Ptr("1.28.3"), // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), // MachineRoles: []*string{ // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, // MachineSKUID: to.Ptr("684E-3B16-399E"), // OamIPv4Address: to.Ptr("192.0.2.1"), // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), // OSImage: to.Ptr("v20220805e"), // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), // DefinitionsVersion: to.Ptr("1.2.3"), // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), // }, // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Bare Metal Machine Identity - console"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // ServiceTag: to.Ptr("ST1219XXX"), // }, // }}, // } } }
Output:
func (*BareMetalMachinesClient) NewListBySubscriptionPager ¶
func (client *BareMetalMachinesClient) NewListBySubscriptionPager(options *BareMetalMachinesClientListBySubscriptionOptions) *runtime.Pager[BareMetalMachinesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of bare metal machines in the provided subscription.
Generated from API version 2024-07-01
- options - BareMetalMachinesClientListBySubscriptionOptions contains the optional parameters for the BareMetalMachinesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BareMetalMachines_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBareMetalMachinesClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.BareMetalMachineList = armnetworkcloud.BareMetalMachineList{ // Value: []*armnetworkcloud.BareMetalMachine{ // { // Name: to.Ptr("bareMetalMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/bareMetalMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BareMetalMachineProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // BmcConnectionString: to.Ptr("bmcconnectionstring"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("bmcuser"), // }, // BmcMacAddress: to.Ptr("00:00:4f:00:57:00"), // BootMacAddress: to.Ptr("00:00:4e:00:58:af"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CordonStatus: to.Ptr(armnetworkcloud.BareMetalMachineCordonStatusUncordoned), // DetailedStatus: to.Ptr(armnetworkcloud.BareMetalMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("DetailedStatusMessage"), // HardwareInventory: &armnetworkcloud.HardwareInventory{ // AdditionalHostInformation: to.Ptr("Machine specific information..."), // Interfaces: []*armnetworkcloud.HardwareInventoryNetworkInterface{ // { // Name: to.Ptr("networkInterfaceName"), // LinkStatus: to.Ptr("Up"), // MacAddress: to.Ptr("2C:54:91:88:C9:E3"), // NetworkInterfaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkDevices/networkDeviceName/networkInterfaces/networkInterfaceName"), // }}, // }, // HardwareValidationStatus: &armnetworkcloud.HardwareValidationStatus{ // LastValidationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T13:27:03.008Z"); return t}()), // Result: to.Ptr(armnetworkcloud.BareMetalMachineHardwareValidationResultPass), // }, // KubernetesNodeName: to.Ptr("node01"), // KubernetesVersion: to.Ptr("1.28.3"), // MachineClusterVersion: to.Ptr("3.8.7"), // MachineDetails: to.Ptr("User-provided machine details."), // MachineName: to.Ptr("r01c001"), // MachineRoles: []*string{ // to.Ptr("platform.afo-nc.microsoft.com/management-plane=true")}, // MachineSKUID: to.Ptr("684E-3B16-399E"), // OamIPv4Address: to.Ptr("192.0.2.1"), // OamIPv6Address: to.Ptr("0:0:0:0:0:FFFF:7F00:0001"), // OSImage: to.Ptr("v20220805e"), // PowerState: to.Ptr(armnetworkcloud.BareMetalMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.BareMetalMachineProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // ReadyState: to.Ptr(armnetworkcloud.BareMetalMachineReadyStateTrue), // RuntimeProtectionStatus: &armnetworkcloud.RuntimeProtectionStatus{ // DefinitionsLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T13:27:03.008Z"); return t}()), // DefinitionsVersion: to.Ptr("1.2.3"), // ScanCompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // ScanScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-01T13:00:00.000Z"); return t}()), // ScanStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:00:03.008Z"); return t}()), // }, // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-console-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Bare Metal Machine Identity - console"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // ServiceTag: to.Ptr("ST1219XXX"), // }, // }}, // } } }
Output:
type BareMetalMachinesClientBeginCordonOptions ¶
type BareMetalMachinesClientBeginCordonOptions struct { // The request body. BareMetalMachineCordonParameters *BareMetalMachineCordonParameters // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginCordonOptions contains the optional parameters for the BareMetalMachinesClient.BeginCordon method.
type BareMetalMachinesClientBeginCreateOrUpdateOptions ¶
type BareMetalMachinesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the BareMetalMachinesClient.BeginCreateOrUpdate method.
type BareMetalMachinesClientBeginDeleteOptions ¶
type BareMetalMachinesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginDeleteOptions contains the optional parameters for the BareMetalMachinesClient.BeginDelete method.
type BareMetalMachinesClientBeginPowerOffOptions ¶
type BareMetalMachinesClientBeginPowerOffOptions struct { // The request body. BareMetalMachinePowerOffParameters *BareMetalMachinePowerOffParameters // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginPowerOffOptions contains the optional parameters for the BareMetalMachinesClient.BeginPowerOff method.
type BareMetalMachinesClientBeginReimageOptions ¶
type BareMetalMachinesClientBeginReimageOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginReimageOptions contains the optional parameters for the BareMetalMachinesClient.BeginReimage method.
type BareMetalMachinesClientBeginReplaceOptions ¶
type BareMetalMachinesClientBeginReplaceOptions struct { // The request body. BareMetalMachineReplaceParameters *BareMetalMachineReplaceParameters // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginReplaceOptions contains the optional parameters for the BareMetalMachinesClient.BeginReplace method.
type BareMetalMachinesClientBeginRestartOptions ¶
type BareMetalMachinesClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginRestartOptions contains the optional parameters for the BareMetalMachinesClient.BeginRestart method.
type BareMetalMachinesClientBeginRunCommandOptions ¶
type BareMetalMachinesClientBeginRunCommandOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginRunCommandOptions contains the optional parameters for the BareMetalMachinesClient.BeginRunCommand method.
type BareMetalMachinesClientBeginRunDataExtractsOptions ¶
type BareMetalMachinesClientBeginRunDataExtractsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginRunDataExtractsOptions contains the optional parameters for the BareMetalMachinesClient.BeginRunDataExtracts method.
type BareMetalMachinesClientBeginRunReadCommandsOptions ¶
type BareMetalMachinesClientBeginRunReadCommandsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginRunReadCommandsOptions contains the optional parameters for the BareMetalMachinesClient.BeginRunReadCommands method.
type BareMetalMachinesClientBeginStartOptions ¶
type BareMetalMachinesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginStartOptions contains the optional parameters for the BareMetalMachinesClient.BeginStart method.
type BareMetalMachinesClientBeginUncordonOptions ¶
type BareMetalMachinesClientBeginUncordonOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginUncordonOptions contains the optional parameters for the BareMetalMachinesClient.BeginUncordon method.
type BareMetalMachinesClientBeginUpdateOptions ¶
type BareMetalMachinesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BareMetalMachinesClientBeginUpdateOptions contains the optional parameters for the BareMetalMachinesClient.BeginUpdate method.
type BareMetalMachinesClientCordonResponse ¶
type BareMetalMachinesClientCordonResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientCordonResponse contains the response from method BareMetalMachinesClient.BeginCordon.
type BareMetalMachinesClientCreateOrUpdateResponse ¶
type BareMetalMachinesClientCreateOrUpdateResponse struct { // BareMetalMachine represents the physical machine in the rack. BareMetalMachine }
BareMetalMachinesClientCreateOrUpdateResponse contains the response from method BareMetalMachinesClient.BeginCreateOrUpdate.
type BareMetalMachinesClientDeleteResponse ¶
type BareMetalMachinesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientDeleteResponse contains the response from method BareMetalMachinesClient.BeginDelete.
type BareMetalMachinesClientGetOptions ¶
type BareMetalMachinesClientGetOptions struct { }
BareMetalMachinesClientGetOptions contains the optional parameters for the BareMetalMachinesClient.Get method.
type BareMetalMachinesClientGetResponse ¶
type BareMetalMachinesClientGetResponse struct { // BareMetalMachine represents the physical machine in the rack. BareMetalMachine }
BareMetalMachinesClientGetResponse contains the response from method BareMetalMachinesClient.Get.
type BareMetalMachinesClientListByResourceGroupOptions ¶
type BareMetalMachinesClientListByResourceGroupOptions struct { }
BareMetalMachinesClientListByResourceGroupOptions contains the optional parameters for the BareMetalMachinesClient.NewListByResourceGroupPager method.
type BareMetalMachinesClientListByResourceGroupResponse ¶
type BareMetalMachinesClientListByResourceGroupResponse struct { // BareMetalMachineList represents a list of bare metal machines. BareMetalMachineList }
BareMetalMachinesClientListByResourceGroupResponse contains the response from method BareMetalMachinesClient.NewListByResourceGroupPager.
type BareMetalMachinesClientListBySubscriptionOptions ¶
type BareMetalMachinesClientListBySubscriptionOptions struct { }
BareMetalMachinesClientListBySubscriptionOptions contains the optional parameters for the BareMetalMachinesClient.NewListBySubscriptionPager method.
type BareMetalMachinesClientListBySubscriptionResponse ¶
type BareMetalMachinesClientListBySubscriptionResponse struct { // BareMetalMachineList represents a list of bare metal machines. BareMetalMachineList }
BareMetalMachinesClientListBySubscriptionResponse contains the response from method BareMetalMachinesClient.NewListBySubscriptionPager.
type BareMetalMachinesClientPowerOffResponse ¶
type BareMetalMachinesClientPowerOffResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientPowerOffResponse contains the response from method BareMetalMachinesClient.BeginPowerOff.
type BareMetalMachinesClientReimageResponse ¶
type BareMetalMachinesClientReimageResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientReimageResponse contains the response from method BareMetalMachinesClient.BeginReimage.
type BareMetalMachinesClientReplaceResponse ¶
type BareMetalMachinesClientReplaceResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientReplaceResponse contains the response from method BareMetalMachinesClient.BeginReplace.
type BareMetalMachinesClientRestartResponse ¶
type BareMetalMachinesClientRestartResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientRestartResponse contains the response from method BareMetalMachinesClient.BeginRestart.
type BareMetalMachinesClientRunCommandResponse ¶
type BareMetalMachinesClientRunCommandResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientRunCommandResponse contains the response from method BareMetalMachinesClient.BeginRunCommand.
type BareMetalMachinesClientRunDataExtractsResponse ¶
type BareMetalMachinesClientRunDataExtractsResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientRunDataExtractsResponse contains the response from method BareMetalMachinesClient.BeginRunDataExtracts.
type BareMetalMachinesClientRunReadCommandsResponse ¶
type BareMetalMachinesClientRunReadCommandsResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientRunReadCommandsResponse contains the response from method BareMetalMachinesClient.BeginRunReadCommands.
type BareMetalMachinesClientStartResponse ¶
type BareMetalMachinesClientStartResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientStartResponse contains the response from method BareMetalMachinesClient.BeginStart.
type BareMetalMachinesClientUncordonResponse ¶
type BareMetalMachinesClientUncordonResponse struct { // The current status of an async operation. OperationStatusResult }
BareMetalMachinesClientUncordonResponse contains the response from method BareMetalMachinesClient.BeginUncordon.
type BareMetalMachinesClientUpdateResponse ¶
type BareMetalMachinesClientUpdateResponse struct { // BareMetalMachine represents the physical machine in the rack. BareMetalMachine }
BareMetalMachinesClientUpdateResponse contains the response from method BareMetalMachinesClient.BeginUpdate.
type BfdEnabled ¶ added in v0.2.0
type BfdEnabled string
BfdEnabled - The indicator to determine if automatic allocation from the pool should occur.
const ( BfdEnabledFalse BfdEnabled = "False" BfdEnabledTrue BfdEnabled = "True" )
func PossibleBfdEnabledValues ¶ added in v0.2.0
func PossibleBfdEnabledValues() []BfdEnabled
PossibleBfdEnabledValues returns the possible values for the BfdEnabled const type.
type BgpAdvertisement ¶ added in v0.2.0
type BgpAdvertisement struct { // REQUIRED; The names of the IP address pools associated with this announcement. IPAddressPools []*string // The indicator of if this advertisement is also made to the network fabric associated with the Network Cloud Cluster. This // field is ignored if fabricPeeringEnabled is set to False. AdvertiseToFabric *AdvertiseToFabric // The names of the BGP communities to be associated with the announcement, utilizing a BGP community string in 1234:1234 // format. Communities []*string // The names of the BGP peers to limit this advertisement to. If no values are specified, all BGP peers will receive this // advertisement. Peers []*string }
BgpAdvertisement represents the association of IP address pools to the communities and peers.
func (BgpAdvertisement) MarshalJSON ¶ added in v0.2.0
func (b BgpAdvertisement) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BgpAdvertisement.
func (*BgpAdvertisement) UnmarshalJSON ¶ added in v0.2.0
func (b *BgpAdvertisement) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BgpAdvertisement.
type BgpMultiHop ¶ added in v0.2.0
type BgpMultiHop string
BgpMultiHop - The indicator to enable multi-hop peering support.
const ( BgpMultiHopFalse BgpMultiHop = "False" BgpMultiHopTrue BgpMultiHop = "True" )
func PossibleBgpMultiHopValues ¶ added in v0.2.0
func PossibleBgpMultiHopValues() []BgpMultiHop
PossibleBgpMultiHopValues returns the possible values for the BgpMultiHop const type.
type BgpServiceLoadBalancerConfiguration ¶ added in v0.2.0
type BgpServiceLoadBalancerConfiguration struct { // The association of IP address pools to the communities and peers, allowing for announcement of IPs. BgpAdvertisements []*BgpAdvertisement // The list of additional BgpPeer entities that the Kubernetes cluster will peer with. All peering must be explicitly defined. BgpPeers []*ServiceLoadBalancerBgpPeer // The indicator to specify if the load balancer peers with the network fabric. FabricPeeringEnabled *FabricPeeringEnabled // The list of pools of IP addresses that can be allocated to load balancer services. IPAddressPools []*IPAddressPool }
BgpServiceLoadBalancerConfiguration represents the configuration of a BGP service load balancer.
func (BgpServiceLoadBalancerConfiguration) MarshalJSON ¶ added in v0.2.0
func (b BgpServiceLoadBalancerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BgpServiceLoadBalancerConfiguration.
func (*BgpServiceLoadBalancerConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (b *BgpServiceLoadBalancerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceLoadBalancerConfiguration.
type BmcKeySet ¶
type BmcKeySet struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *BmcKeySetProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
BmcKeySet represents the baseboard management controller key set.
func (BmcKeySet) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type BmcKeySet.
func (*BmcKeySet) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type BmcKeySet.
type BmcKeySetDetailedStatus ¶
type BmcKeySetDetailedStatus string
BmcKeySetDetailedStatus - The more detailed status of the key set.
const ( BmcKeySetDetailedStatusAllActive BmcKeySetDetailedStatus = "AllActive" BmcKeySetDetailedStatusAllInvalid BmcKeySetDetailedStatus = "AllInvalid" BmcKeySetDetailedStatusSomeInvalid BmcKeySetDetailedStatus = "SomeInvalid" BmcKeySetDetailedStatusValidating BmcKeySetDetailedStatus = "Validating" )
func PossibleBmcKeySetDetailedStatusValues ¶
func PossibleBmcKeySetDetailedStatusValues() []BmcKeySetDetailedStatus
PossibleBmcKeySetDetailedStatusValues returns the possible values for the BmcKeySetDetailedStatus const type.
type BmcKeySetList ¶
type BmcKeySetList struct { // The link used to get the next page of operations. NextLink *string // The list of baseboard management controller key sets. Value []*BmcKeySet }
BmcKeySetList represents a list of baseboard management controller key sets.
func (BmcKeySetList) MarshalJSON ¶
func (b BmcKeySetList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BmcKeySetList.
func (*BmcKeySetList) UnmarshalJSON ¶
func (b *BmcKeySetList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BmcKeySetList.
type BmcKeySetPatchParameters ¶
type BmcKeySetPatchParameters struct { // The list of the resource properties. Properties *BmcKeySetPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
BmcKeySetPatchParameters represents the body of the request to patch the baseboard management controller key set.
func (BmcKeySetPatchParameters) MarshalJSON ¶
func (b BmcKeySetPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BmcKeySetPatchParameters.
func (*BmcKeySetPatchParameters) UnmarshalJSON ¶
func (b *BmcKeySetPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BmcKeySetPatchParameters.
type BmcKeySetPatchProperties ¶
type BmcKeySetPatchProperties struct { // The date and time after which the users in this key set will be removed from the baseboard management controllers. Expiration *time.Time // The unique list of permitted users. UserList []*KeySetUser }
BmcKeySetPatchProperties represents the properties of baseboard management controller key set that are patchable.
func (BmcKeySetPatchProperties) MarshalJSON ¶
func (b BmcKeySetPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BmcKeySetPatchProperties.
func (*BmcKeySetPatchProperties) UnmarshalJSON ¶
func (b *BmcKeySetPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BmcKeySetPatchProperties.
type BmcKeySetPrivilegeLevel ¶
type BmcKeySetPrivilegeLevel string
BmcKeySetPrivilegeLevel - The access level allowed for the users in this key set.
const ( BmcKeySetPrivilegeLevelAdministrator BmcKeySetPrivilegeLevel = "Administrator" BmcKeySetPrivilegeLevelReadOnly BmcKeySetPrivilegeLevel = "ReadOnly" )
func PossibleBmcKeySetPrivilegeLevelValues ¶
func PossibleBmcKeySetPrivilegeLevelValues() []BmcKeySetPrivilegeLevel
PossibleBmcKeySetPrivilegeLevelValues returns the possible values for the BmcKeySetPrivilegeLevel const type.
type BmcKeySetProperties ¶
type BmcKeySetProperties struct { // REQUIRED; The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. // Users that are not in the group will not have access. AzureGroupID *string // REQUIRED; The date and time after which the users in this key set will be removed from the baseboard management controllers. Expiration *time.Time // REQUIRED; The access level allowed for the users in this key set. PrivilegeLevel *BmcKeySetPrivilegeLevel // REQUIRED; The unique list of permitted users. UserList []*KeySetUser // READ-ONLY; The more detailed status of the key set. DetailedStatus *BmcKeySetDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The last time this key set was validated. LastValidation *time.Time // READ-ONLY; The provisioning state of the baseboard management controller key set. ProvisioningState *BmcKeySetProvisioningState // READ-ONLY; The status evaluation of each user. UserListStatus []*KeySetUserStatus }
BmcKeySetProperties represents the properties of baseboard management controller key set.
func (BmcKeySetProperties) MarshalJSON ¶
func (b BmcKeySetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BmcKeySetProperties.
func (*BmcKeySetProperties) UnmarshalJSON ¶
func (b *BmcKeySetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BmcKeySetProperties.
type BmcKeySetProvisioningState ¶
type BmcKeySetProvisioningState string
BmcKeySetProvisioningState - The provisioning state of the baseboard management controller key set.
const ( BmcKeySetProvisioningStateAccepted BmcKeySetProvisioningState = "Accepted" BmcKeySetProvisioningStateCanceled BmcKeySetProvisioningState = "Canceled" BmcKeySetProvisioningStateFailed BmcKeySetProvisioningState = "Failed" BmcKeySetProvisioningStateProvisioning BmcKeySetProvisioningState = "Provisioning" BmcKeySetProvisioningStateSucceeded BmcKeySetProvisioningState = "Succeeded" )
func PossibleBmcKeySetProvisioningStateValues ¶
func PossibleBmcKeySetProvisioningStateValues() []BmcKeySetProvisioningState
PossibleBmcKeySetProvisioningStateValues returns the possible values for the BmcKeySetProvisioningState const type.
type BmcKeySetsClient ¶
type BmcKeySetsClient struct {
// contains filtered or unexported fields
}
BmcKeySetsClient contains the methods for the BmcKeySets group. Don't use this type directly, use NewBmcKeySetsClient() instead.
func NewBmcKeySetsClient ¶
func NewBmcKeySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BmcKeySetsClient, error)
NewBmcKeySetsClient creates a new instance of BmcKeySetsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BmcKeySetsClient) BeginCreateOrUpdate ¶
func (client *BmcKeySetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, bmcKeySetParameters BmcKeySet, options *BmcKeySetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BmcKeySetsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new baseboard management controller key set or update the existing one for the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bmcKeySetName - The name of the baseboard management controller key set.
- bmcKeySetParameters - The request body.
- options - BmcKeySetsClientBeginCreateOrUpdateOptions contains the optional parameters for the BmcKeySetsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BmcKeySets_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBmcKeySetsClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterName", "bmcKeySetName", armnetworkcloud.BmcKeySet{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.BmcKeySetProperties{ AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t }()), PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), UserList: []*armnetworkcloud.KeySetUser{ { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userABC"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userXYZ"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BmcKeySet = armnetworkcloud.BmcKeySet{ // Name: to.Ptr("bmcKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bmcKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bmcKeySets/bmcKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), // ProvisioningState: to.Ptr(armnetworkcloud.BmcKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // } }
Output:
func (*BmcKeySetsClient) BeginDelete ¶
func (client *BmcKeySetsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, options *BmcKeySetsClientBeginDeleteOptions) (*runtime.Poller[BmcKeySetsClientDeleteResponse], error)
BeginDelete - Delete the baseboard management controller key set of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bmcKeySetName - The name of the baseboard management controller key set.
- options - BmcKeySetsClientBeginDeleteOptions contains the optional parameters for the BmcKeySetsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BmcKeySets_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBmcKeySetsClient().BeginDelete(ctx, "resourceGroupName", "clusterName", "bmcKeySetName", 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 (*BmcKeySetsClient) BeginUpdate ¶
func (client *BmcKeySetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, bmcKeySetUpdateParameters BmcKeySetPatchParameters, options *BmcKeySetsClientBeginUpdateOptions) (*runtime.Poller[BmcKeySetsClientUpdateResponse], error)
BeginUpdate - Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bmcKeySetName - The name of the baseboard management controller key set.
- bmcKeySetUpdateParameters - The request body.
- options - BmcKeySetsClientBeginUpdateOptions contains the optional parameters for the BmcKeySetsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BmcKeySets_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBmcKeySetsClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", "bmcKeySetName", armnetworkcloud.BmcKeySetPatchParameters{ Properties: &armnetworkcloud.BmcKeySetPatchProperties{ Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t }()), UserList: []*armnetworkcloud.KeySetUser{ { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userABC"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }, { Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), AzureUserName: to.Ptr("userXYZ"), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, UserPrincipalName: to.Ptr("userABC@contoso.com"), }}, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BmcKeySet = armnetworkcloud.BmcKeySet{ // Name: to.Ptr("bmcKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bmcKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bmcKeySets/bmcKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), // ProvisioningState: to.Ptr(armnetworkcloud.BmcKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // } }
Output:
func (*BmcKeySetsClient) Get ¶
func (client *BmcKeySetsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, bmcKeySetName string, options *BmcKeySetsClientGetOptions) (BmcKeySetsClientGetResponse, error)
Get - Get baseboard management controller key set of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- bmcKeySetName - The name of the baseboard management controller key set.
- options - BmcKeySetsClientGetOptions contains the optional parameters for the BmcKeySetsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BmcKeySets_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBmcKeySetsClient().Get(ctx, "resourceGroupName", "clusterName", "bmcKeySetName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BmcKeySet = armnetworkcloud.BmcKeySet{ // Name: to.Ptr("bmcKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bmcKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bmcKeySets/bmcKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), // ProvisioningState: to.Ptr(armnetworkcloud.BmcKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // } }
Output:
func (*BmcKeySetsClient) NewListByClusterPager ¶ added in v0.2.0
func (client *BmcKeySetsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *BmcKeySetsClientListByClusterOptions) *runtime.Pager[BmcKeySetsClientListByClusterResponse]
NewListByClusterPager - Get a list of baseboard management controller key sets for the provided cluster.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - BmcKeySetsClientListByClusterOptions contains the optional parameters for the BmcKeySetsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/BmcKeySets_ListByCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBmcKeySetsClient().NewListByClusterPager("resourceGroupName", "clusterName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.BmcKeySetList = armnetworkcloud.BmcKeySetList{ // Value: []*armnetworkcloud.BmcKeySet{ // { // Name: to.Ptr("bmcKeySetName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/bmcKeySets"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/bmcKeySets/bmcKeySetName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.BmcKeySetProperties{ // AzureGroupID: to.Ptr("f110271b-XXXX-4163-9b99-214d91660f0e"), // DetailedStatus: to.Ptr(armnetworkcloud.BmcKeySetDetailedStatusSomeInvalid), // DetailedStatusMessage: to.Ptr("Invalid Azure user(s) were provided: userXYZ"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-31T23:59:59.008Z"); return t}()), // LastValidation: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-12T12:00:00.008Z"); return t}()), // PrivilegeLevel: to.Ptr(armnetworkcloud.BmcKeySetPrivilegeLevelAdministrator), // ProvisioningState: to.Ptr(armnetworkcloud.BmcKeySetProvisioningStateSucceeded), // UserList: []*armnetworkcloud.KeySetUser{ // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userABC"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userABC@contoso.com"), // }, // { // Description: to.Ptr("Needs access for troubleshooting as a part of the support team"), // AzureUserName: to.Ptr("userXYZ"), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // UserPrincipalName: to.Ptr("userXYZ@contoso.com"), // }}, // UserListStatus: []*armnetworkcloud.KeySetUserStatus{ // { // AzureUserName: to.Ptr("userABC"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusActive), // StatusMessage: to.Ptr("User has been provisioned"), // }, // { // AzureUserName: to.Ptr("userXYZ"), // Status: to.Ptr(armnetworkcloud.BareMetalMachineKeySetUserSetupStatusInvalid), // StatusMessage: to.Ptr("User is not a valid Azure user"), // }}, // }, // }}, // } } }
Output:
type BmcKeySetsClientBeginCreateOrUpdateOptions ¶
type BmcKeySetsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BmcKeySetsClientBeginCreateOrUpdateOptions contains the optional parameters for the BmcKeySetsClient.BeginCreateOrUpdate method.
type BmcKeySetsClientBeginDeleteOptions ¶
type BmcKeySetsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BmcKeySetsClientBeginDeleteOptions contains the optional parameters for the BmcKeySetsClient.BeginDelete method.
type BmcKeySetsClientBeginUpdateOptions ¶
type BmcKeySetsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BmcKeySetsClientBeginUpdateOptions contains the optional parameters for the BmcKeySetsClient.BeginUpdate method.
type BmcKeySetsClientCreateOrUpdateResponse ¶
type BmcKeySetsClientCreateOrUpdateResponse struct { // BmcKeySet represents the baseboard management controller key set. BmcKeySet }
BmcKeySetsClientCreateOrUpdateResponse contains the response from method BmcKeySetsClient.BeginCreateOrUpdate.
type BmcKeySetsClientDeleteResponse ¶
type BmcKeySetsClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
BmcKeySetsClientDeleteResponse contains the response from method BmcKeySetsClient.BeginDelete.
type BmcKeySetsClientGetOptions ¶
type BmcKeySetsClientGetOptions struct { }
BmcKeySetsClientGetOptions contains the optional parameters for the BmcKeySetsClient.Get method.
type BmcKeySetsClientGetResponse ¶
type BmcKeySetsClientGetResponse struct { // BmcKeySet represents the baseboard management controller key set. BmcKeySet }
BmcKeySetsClientGetResponse contains the response from method BmcKeySetsClient.Get.
type BmcKeySetsClientListByClusterOptions ¶ added in v0.2.0
type BmcKeySetsClientListByClusterOptions struct { }
BmcKeySetsClientListByClusterOptions contains the optional parameters for the BmcKeySetsClient.NewListByClusterPager method.
type BmcKeySetsClientListByClusterResponse ¶ added in v0.2.0
type BmcKeySetsClientListByClusterResponse struct { // BmcKeySetList represents a list of baseboard management controller key sets. BmcKeySetList }
BmcKeySetsClientListByClusterResponse contains the response from method BmcKeySetsClient.NewListByClusterPager.
type BmcKeySetsClientUpdateResponse ¶
type BmcKeySetsClientUpdateResponse struct { // BmcKeySet represents the baseboard management controller key set. BmcKeySet }
BmcKeySetsClientUpdateResponse contains the response from method BmcKeySetsClient.BeginUpdate.
type BootstrapProtocol ¶
type BootstrapProtocol string
BootstrapProtocol - The type of bootstrap protocol used.
const (
BootstrapProtocolPXE BootstrapProtocol = "PXE"
)
func PossibleBootstrapProtocolValues ¶
func PossibleBootstrapProtocolValues() []BootstrapProtocol
PossibleBootstrapProtocolValues returns the possible values for the BootstrapProtocol const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAgentPoolsClient ¶ added in v0.2.0
func (c *ClientFactory) NewAgentPoolsClient() *AgentPoolsClient
NewAgentPoolsClient creates a new instance of AgentPoolsClient.
func (*ClientFactory) NewBareMetalMachineKeySetsClient ¶
func (c *ClientFactory) NewBareMetalMachineKeySetsClient() *BareMetalMachineKeySetsClient
NewBareMetalMachineKeySetsClient creates a new instance of BareMetalMachineKeySetsClient.
func (*ClientFactory) NewBareMetalMachinesClient ¶
func (c *ClientFactory) NewBareMetalMachinesClient() *BareMetalMachinesClient
NewBareMetalMachinesClient creates a new instance of BareMetalMachinesClient.
func (*ClientFactory) NewBmcKeySetsClient ¶
func (c *ClientFactory) NewBmcKeySetsClient() *BmcKeySetsClient
NewBmcKeySetsClient creates a new instance of BmcKeySetsClient.
func (*ClientFactory) NewCloudServicesNetworksClient ¶
func (c *ClientFactory) NewCloudServicesNetworksClient() *CloudServicesNetworksClient
NewCloudServicesNetworksClient creates a new instance of CloudServicesNetworksClient.
func (*ClientFactory) NewClusterManagersClient ¶
func (c *ClientFactory) NewClusterManagersClient() *ClusterManagersClient
NewClusterManagersClient creates a new instance of ClusterManagersClient.
func (*ClientFactory) NewClustersClient ¶
func (c *ClientFactory) NewClustersClient() *ClustersClient
NewClustersClient creates a new instance of ClustersClient.
func (*ClientFactory) NewConsolesClient ¶
func (c *ClientFactory) NewConsolesClient() *ConsolesClient
NewConsolesClient creates a new instance of ConsolesClient.
func (*ClientFactory) NewKubernetesClusterFeaturesClient ¶ added in v1.2.0
func (c *ClientFactory) NewKubernetesClusterFeaturesClient() *KubernetesClusterFeaturesClient
NewKubernetesClusterFeaturesClient creates a new instance of KubernetesClusterFeaturesClient.
func (*ClientFactory) NewKubernetesClustersClient ¶ added in v0.2.0
func (c *ClientFactory) NewKubernetesClustersClient() *KubernetesClustersClient
NewKubernetesClustersClient creates a new instance of KubernetesClustersClient.
func (*ClientFactory) NewL2NetworksClient ¶
func (c *ClientFactory) NewL2NetworksClient() *L2NetworksClient
NewL2NetworksClient creates a new instance of L2NetworksClient.
func (*ClientFactory) NewL3NetworksClient ¶
func (c *ClientFactory) NewL3NetworksClient() *L3NetworksClient
NewL3NetworksClient creates a new instance of L3NetworksClient.
func (*ClientFactory) NewMetricsConfigurationsClient ¶
func (c *ClientFactory) NewMetricsConfigurationsClient() *MetricsConfigurationsClient
NewMetricsConfigurationsClient creates a new instance of MetricsConfigurationsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewRackSKUsClient ¶
func (c *ClientFactory) NewRackSKUsClient() *RackSKUsClient
NewRackSKUsClient creates a new instance of RackSKUsClient.
func (*ClientFactory) NewRacksClient ¶
func (c *ClientFactory) NewRacksClient() *RacksClient
NewRacksClient creates a new instance of RacksClient.
func (*ClientFactory) NewStorageAppliancesClient ¶
func (c *ClientFactory) NewStorageAppliancesClient() *StorageAppliancesClient
NewStorageAppliancesClient creates a new instance of StorageAppliancesClient.
func (*ClientFactory) NewTrunkedNetworksClient ¶
func (c *ClientFactory) NewTrunkedNetworksClient() *TrunkedNetworksClient
NewTrunkedNetworksClient creates a new instance of TrunkedNetworksClient.
func (*ClientFactory) NewVirtualMachinesClient ¶
func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.
func (*ClientFactory) NewVolumesClient ¶
func (c *ClientFactory) NewVolumesClient() *VolumesClient
NewVolumesClient creates a new instance of VolumesClient.
type CloudServicesNetwork ¶
type CloudServicesNetwork struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // The list of the resource properties. Properties *CloudServicesNetworkProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
CloudServicesNetwork - Upon creation, the additional services that are provided by the platform will be allocated and represented in the status of this resource. All resources associated with this cloud services network will be part of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many virtual machines and/or Hybrid AKS clusters.
func (CloudServicesNetwork) MarshalJSON ¶
func (c CloudServicesNetwork) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudServicesNetwork.
func (*CloudServicesNetwork) UnmarshalJSON ¶
func (c *CloudServicesNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudServicesNetwork.
type CloudServicesNetworkDetailedStatus ¶
type CloudServicesNetworkDetailedStatus string
CloudServicesNetworkDetailedStatus - The more detailed status of the cloud services network.
const ( CloudServicesNetworkDetailedStatusAvailable CloudServicesNetworkDetailedStatus = "Available" CloudServicesNetworkDetailedStatusError CloudServicesNetworkDetailedStatus = "Error" CloudServicesNetworkDetailedStatusProvisioning CloudServicesNetworkDetailedStatus = "Provisioning" )
func PossibleCloudServicesNetworkDetailedStatusValues ¶
func PossibleCloudServicesNetworkDetailedStatusValues() []CloudServicesNetworkDetailedStatus
PossibleCloudServicesNetworkDetailedStatusValues returns the possible values for the CloudServicesNetworkDetailedStatus const type.
type CloudServicesNetworkEnableDefaultEgressEndpoints ¶
type CloudServicesNetworkEnableDefaultEgressEndpoints string
CloudServicesNetworkEnableDefaultEgressEndpoints - The indicator of whether the platform default endpoints are allowed for the egress traffic.
const ( CloudServicesNetworkEnableDefaultEgressEndpointsFalse CloudServicesNetworkEnableDefaultEgressEndpoints = "False" CloudServicesNetworkEnableDefaultEgressEndpointsTrue CloudServicesNetworkEnableDefaultEgressEndpoints = "True" )
func PossibleCloudServicesNetworkEnableDefaultEgressEndpointsValues ¶
func PossibleCloudServicesNetworkEnableDefaultEgressEndpointsValues() []CloudServicesNetworkEnableDefaultEgressEndpoints
PossibleCloudServicesNetworkEnableDefaultEgressEndpointsValues returns the possible values for the CloudServicesNetworkEnableDefaultEgressEndpoints const type.
type CloudServicesNetworkList ¶
type CloudServicesNetworkList struct { // The link used to get the next page of operations. NextLink *string // The list of cloud services networks. Value []*CloudServicesNetwork }
CloudServicesNetworkList represents a list of cloud services networks.
func (CloudServicesNetworkList) MarshalJSON ¶
func (c CloudServicesNetworkList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudServicesNetworkList.
func (*CloudServicesNetworkList) UnmarshalJSON ¶
func (c *CloudServicesNetworkList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudServicesNetworkList.
type CloudServicesNetworkPatchParameters ¶
type CloudServicesNetworkPatchParameters struct { // The list of the resource properties. Properties *CloudServicesNetworkPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
CloudServicesNetworkPatchParameters represents the body of the request to patch the cloud services network.
func (CloudServicesNetworkPatchParameters) MarshalJSON ¶
func (c CloudServicesNetworkPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudServicesNetworkPatchParameters.
func (*CloudServicesNetworkPatchParameters) UnmarshalJSON ¶
func (c *CloudServicesNetworkPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudServicesNetworkPatchParameters.
type CloudServicesNetworkPatchProperties ¶
type CloudServicesNetworkPatchProperties struct { // The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. AdditionalEgressEndpoints []*EgressEndpoint // The indicator of whether the platform default endpoints are allowed for the egress traffic. EnableDefaultEgressEndpoints *CloudServicesNetworkEnableDefaultEgressEndpoints }
CloudServicesNetworkPatchProperties represents the properties of the cloud services network that can be updated using a patch request.
func (CloudServicesNetworkPatchProperties) MarshalJSON ¶
func (c CloudServicesNetworkPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudServicesNetworkPatchProperties.
func (*CloudServicesNetworkPatchProperties) UnmarshalJSON ¶
func (c *CloudServicesNetworkPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudServicesNetworkPatchProperties.
type CloudServicesNetworkProperties ¶
type CloudServicesNetworkProperties struct { // The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. AdditionalEgressEndpoints []*EgressEndpoint // The indicator of whether the platform default endpoints are allowed for the egress traffic. EnableDefaultEgressEndpoints *CloudServicesNetworkEnableDefaultEgressEndpoints // READ-ONLY; The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. AssociatedResourceIDs []*string // READ-ONLY; The resource ID of the Network Cloud cluster this cloud services network is associated with. ClusterID *string // READ-ONLY; The more detailed status of the cloud services network. DetailedStatus *CloudServicesNetworkDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The full list of additional and default egress endpoints that are currently enabled. EnabledEgressEndpoints []*EgressEndpoint // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated // with this cloud services network. HybridAksClustersAssociatedIDs []*string // READ-ONLY; The name of the interface that will be present in the virtual machine to represent this network. InterfaceName *string // READ-ONLY; The provisioning state of the cloud services network. ProvisioningState *CloudServicesNetworkProvisioningState // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any // Hybrid AKS virtual machines, that are currently using this cloud services network. VirtualMachinesAssociatedIDs []*string }
CloudServicesNetworkProperties represents properties of the cloud services network.
func (CloudServicesNetworkProperties) MarshalJSON ¶
func (c CloudServicesNetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudServicesNetworkProperties.
func (*CloudServicesNetworkProperties) UnmarshalJSON ¶
func (c *CloudServicesNetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudServicesNetworkProperties.
type CloudServicesNetworkProvisioningState ¶
type CloudServicesNetworkProvisioningState string
CloudServicesNetworkProvisioningState - The provisioning state of the cloud services network.
const ( CloudServicesNetworkProvisioningStateAccepted CloudServicesNetworkProvisioningState = "Accepted" CloudServicesNetworkProvisioningStateCanceled CloudServicesNetworkProvisioningState = "Canceled" CloudServicesNetworkProvisioningStateFailed CloudServicesNetworkProvisioningState = "Failed" CloudServicesNetworkProvisioningStateProvisioning CloudServicesNetworkProvisioningState = "Provisioning" CloudServicesNetworkProvisioningStateSucceeded CloudServicesNetworkProvisioningState = "Succeeded" )
func PossibleCloudServicesNetworkProvisioningStateValues ¶
func PossibleCloudServicesNetworkProvisioningStateValues() []CloudServicesNetworkProvisioningState
PossibleCloudServicesNetworkProvisioningStateValues returns the possible values for the CloudServicesNetworkProvisioningState const type.
type CloudServicesNetworksClient ¶
type CloudServicesNetworksClient struct {
// contains filtered or unexported fields
}
CloudServicesNetworksClient contains the methods for the CloudServicesNetworks group. Don't use this type directly, use NewCloudServicesNetworksClient() instead.
func NewCloudServicesNetworksClient ¶
func NewCloudServicesNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesNetworksClient, error)
NewCloudServicesNetworksClient creates a new instance of CloudServicesNetworksClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CloudServicesNetworksClient) BeginCreateOrUpdate ¶
func (client *CloudServicesNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, cloudServicesNetworkParameters CloudServicesNetwork, options *CloudServicesNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[CloudServicesNetworksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new cloud services network or update the properties of the existing cloud services network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cloudServicesNetworkName - The name of the cloud services network.
- cloudServicesNetworkParameters - The request body.
- options - CloudServicesNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudServicesNetworksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/CloudServicesNetworks_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCloudServicesNetworksClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "cloudServicesNetworkName", armnetworkcloud.CloudServicesNetwork{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.CloudServicesNetworkProperties{ AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ { Category: to.Ptr("azure-resource-management"), Endpoints: []*armnetworkcloud.EndpointDependency{ { DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), Port: to.Ptr[int64](443), }}, }}, EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CloudServicesNetwork = armnetworkcloud.CloudServicesNetwork{ // Name: to.Ptr("cloudServicesNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/cloudServicesNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.CloudServicesNetworkProperties{ // AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.CloudServicesNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Cloud services network is up"), // EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), // EnabledEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // InterfaceName: to.Ptr("eth0"), // ProvisioningState: to.Ptr(armnetworkcloud.CloudServicesNetworkProvisioningStateSucceeded), // }, // } }
Output:
func (*CloudServicesNetworksClient) BeginDelete ¶
func (client *CloudServicesNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, options *CloudServicesNetworksClientBeginDeleteOptions) (*runtime.Poller[CloudServicesNetworksClientDeleteResponse], error)
BeginDelete - Delete the provided cloud services network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cloudServicesNetworkName - The name of the cloud services network.
- options - CloudServicesNetworksClientBeginDeleteOptions contains the optional parameters for the CloudServicesNetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/CloudServicesNetworks_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCloudServicesNetworksClient().BeginDelete(ctx, "resourceGroupName", "cloudServicesNetworkName", 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 (*CloudServicesNetworksClient) BeginUpdate ¶
func (client *CloudServicesNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, cloudServicesNetworkUpdateParameters CloudServicesNetworkPatchParameters, options *CloudServicesNetworksClientBeginUpdateOptions) (*runtime.Poller[CloudServicesNetworksClientUpdateResponse], error)
BeginUpdate - Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cloudServicesNetworkName - The name of the cloud services network.
- cloudServicesNetworkUpdateParameters - The request body.
- options - CloudServicesNetworksClientBeginUpdateOptions contains the optional parameters for the CloudServicesNetworksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/CloudServicesNetworks_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCloudServicesNetworksClient().BeginUpdate(ctx, "resourceGroupName", "cloudServicesNetworkName", armnetworkcloud.CloudServicesNetworkPatchParameters{ Properties: &armnetworkcloud.CloudServicesNetworkPatchProperties{ AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ { Category: to.Ptr("azure-resource-management"), Endpoints: []*armnetworkcloud.EndpointDependency{ { DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), Port: to.Ptr[int64](443), }}, }}, EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CloudServicesNetwork = armnetworkcloud.CloudServicesNetwork{ // Name: to.Ptr("cloudServicesNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/cloudServicesNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.CloudServicesNetworkProperties{ // AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.CloudServicesNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Cloud services network is up"), // EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), // EnabledEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // InterfaceName: to.Ptr("eth0"), // ProvisioningState: to.Ptr(armnetworkcloud.CloudServicesNetworkProvisioningStateSucceeded), // }, // } }
Output:
func (*CloudServicesNetworksClient) Get ¶
func (client *CloudServicesNetworksClient) Get(ctx context.Context, resourceGroupName string, cloudServicesNetworkName string, options *CloudServicesNetworksClientGetOptions) (CloudServicesNetworksClientGetResponse, error)
Get - Get properties of the provided cloud services network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cloudServicesNetworkName - The name of the cloud services network.
- options - CloudServicesNetworksClientGetOptions contains the optional parameters for the CloudServicesNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/CloudServicesNetworks_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCloudServicesNetworksClient().Get(ctx, "resourceGroupName", "cloudServicesNetworkName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CloudServicesNetwork = armnetworkcloud.CloudServicesNetwork{ // Name: to.Ptr("cloudServicesNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/cloudServicesNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.CloudServicesNetworkProperties{ // AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.CloudServicesNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Cloud services network is up"), // EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), // EnabledEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // InterfaceName: to.Ptr("eth0"), // ProvisioningState: to.Ptr(armnetworkcloud.CloudServicesNetworkProvisioningStateSucceeded), // }, // } }
Output:
func (*CloudServicesNetworksClient) NewListByResourceGroupPager ¶
func (client *CloudServicesNetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *CloudServicesNetworksClientListByResourceGroupOptions) *runtime.Pager[CloudServicesNetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of cloud services networks in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - CloudServicesNetworksClientListByResourceGroupOptions contains the optional parameters for the CloudServicesNetworksClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/CloudServicesNetworks_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCloudServicesNetworksClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CloudServicesNetworkList = armnetworkcloud.CloudServicesNetworkList{ // Value: []*armnetworkcloud.CloudServicesNetwork{ // { // Name: to.Ptr("cloudServicesNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/cloudServicesNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.CloudServicesNetworkProperties{ // AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.CloudServicesNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Cloud services network is up"), // EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), // EnabledEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // InterfaceName: to.Ptr("eth0"), // ProvisioningState: to.Ptr(armnetworkcloud.CloudServicesNetworkProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*CloudServicesNetworksClient) NewListBySubscriptionPager ¶
func (client *CloudServicesNetworksClient) NewListBySubscriptionPager(options *CloudServicesNetworksClientListBySubscriptionOptions) *runtime.Pager[CloudServicesNetworksClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of cloud services networks in the provided subscription.
Generated from API version 2024-07-01
- options - CloudServicesNetworksClientListBySubscriptionOptions contains the optional parameters for the CloudServicesNetworksClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/CloudServicesNetworks_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCloudServicesNetworksClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CloudServicesNetworkList = armnetworkcloud.CloudServicesNetworkList{ // Value: []*armnetworkcloud.CloudServicesNetwork{ // { // Name: to.Ptr("cloudServicesNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/cloudServicesNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.CloudServicesNetworkProperties{ // AdditionalEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.CloudServicesNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Cloud services network is up"), // EnableDefaultEgressEndpoints: to.Ptr(armnetworkcloud.CloudServicesNetworkEnableDefaultEgressEndpointsFalse), // EnabledEgressEndpoints: []*armnetworkcloud.EgressEndpoint{ // { // Category: to.Ptr("azure-resource-management"), // Endpoints: []*armnetworkcloud.EndpointDependency{ // { // DomainName: to.Ptr("storageaccountex.blob.core.windows.net"), // Port: to.Ptr[int64](443), // }}, // }}, // InterfaceName: to.Ptr("eth0"), // ProvisioningState: to.Ptr(armnetworkcloud.CloudServicesNetworkProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type CloudServicesNetworksClientBeginCreateOrUpdateOptions ¶
type CloudServicesNetworksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CloudServicesNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudServicesNetworksClient.BeginCreateOrUpdate method.
type CloudServicesNetworksClientBeginDeleteOptions ¶
type CloudServicesNetworksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CloudServicesNetworksClientBeginDeleteOptions contains the optional parameters for the CloudServicesNetworksClient.BeginDelete method.
type CloudServicesNetworksClientBeginUpdateOptions ¶
type CloudServicesNetworksClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CloudServicesNetworksClientBeginUpdateOptions contains the optional parameters for the CloudServicesNetworksClient.BeginUpdate method.
type CloudServicesNetworksClientCreateOrUpdateResponse ¶
type CloudServicesNetworksClientCreateOrUpdateResponse struct { // Upon creation, the additional services that are provided by the platform will be allocated and // represented in the status of this resource. All resources associated with this cloud services network will be part // of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many // virtual machines and/or Hybrid AKS clusters. CloudServicesNetwork }
CloudServicesNetworksClientCreateOrUpdateResponse contains the response from method CloudServicesNetworksClient.BeginCreateOrUpdate.
type CloudServicesNetworksClientDeleteResponse ¶
type CloudServicesNetworksClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
CloudServicesNetworksClientDeleteResponse contains the response from method CloudServicesNetworksClient.BeginDelete.
type CloudServicesNetworksClientGetOptions ¶
type CloudServicesNetworksClientGetOptions struct { }
CloudServicesNetworksClientGetOptions contains the optional parameters for the CloudServicesNetworksClient.Get method.
type CloudServicesNetworksClientGetResponse ¶
type CloudServicesNetworksClientGetResponse struct { // Upon creation, the additional services that are provided by the platform will be allocated and // represented in the status of this resource. All resources associated with this cloud services network will be part // of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many // virtual machines and/or Hybrid AKS clusters. CloudServicesNetwork }
CloudServicesNetworksClientGetResponse contains the response from method CloudServicesNetworksClient.Get.
type CloudServicesNetworksClientListByResourceGroupOptions ¶
type CloudServicesNetworksClientListByResourceGroupOptions struct { }
CloudServicesNetworksClientListByResourceGroupOptions contains the optional parameters for the CloudServicesNetworksClient.NewListByResourceGroupPager method.
type CloudServicesNetworksClientListByResourceGroupResponse ¶
type CloudServicesNetworksClientListByResourceGroupResponse struct { // CloudServicesNetworkList represents a list of cloud services networks. CloudServicesNetworkList }
CloudServicesNetworksClientListByResourceGroupResponse contains the response from method CloudServicesNetworksClient.NewListByResourceGroupPager.
type CloudServicesNetworksClientListBySubscriptionOptions ¶
type CloudServicesNetworksClientListBySubscriptionOptions struct { }
CloudServicesNetworksClientListBySubscriptionOptions contains the optional parameters for the CloudServicesNetworksClient.NewListBySubscriptionPager method.
type CloudServicesNetworksClientListBySubscriptionResponse ¶
type CloudServicesNetworksClientListBySubscriptionResponse struct { // CloudServicesNetworkList represents a list of cloud services networks. CloudServicesNetworkList }
CloudServicesNetworksClientListBySubscriptionResponse contains the response from method CloudServicesNetworksClient.NewListBySubscriptionPager.
type CloudServicesNetworksClientUpdateResponse ¶
type CloudServicesNetworksClientUpdateResponse struct { // Upon creation, the additional services that are provided by the platform will be allocated and // represented in the status of this resource. All resources associated with this cloud services network will be part // of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many // virtual machines and/or Hybrid AKS clusters. CloudServicesNetwork }
CloudServicesNetworksClientUpdateResponse contains the response from method CloudServicesNetworksClient.BeginUpdate.
type Cluster ¶
type Cluster struct { // REQUIRED; The extended location of the cluster manager associated with the cluster. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *ClusterProperties // The identity for the resource. Identity *ManagedServiceIdentity // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Cluster represents the on-premises Network Cloud 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 ClusterAvailableUpgradeVersion ¶
type ClusterAvailableUpgradeVersion struct { // READ-ONLY; The indicator of whether the control plane will be impacted during the upgrade. ControlImpact *ControlImpact // READ-ONLY; The expected duration needed for this upgrade. ExpectedDuration *string // READ-ONLY; The impact description including the specific details and release notes. ImpactDescription *string // READ-ONLY; The last date the version of the platform is supported. SupportExpiryDate *string // READ-ONLY; The target version this cluster will be upgraded to. TargetClusterVersion *string // READ-ONLY; The indicator of whether the workload will be impacted during the upgrade. WorkloadImpact *WorkloadImpact }
ClusterAvailableUpgradeVersion represents the various cluster upgrade parameters.
func (ClusterAvailableUpgradeVersion) MarshalJSON ¶
func (c ClusterAvailableUpgradeVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterAvailableUpgradeVersion.
func (*ClusterAvailableUpgradeVersion) UnmarshalJSON ¶
func (c *ClusterAvailableUpgradeVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterAvailableUpgradeVersion.
type ClusterAvailableVersion ¶
type ClusterAvailableVersion struct { // READ-ONLY; The last date the version of the platform is supported. SupportExpiryDate *string // READ-ONLY; The version of the cluster to be deployed. TargetClusterVersion *string }
ClusterAvailableVersion represents the cluster version that the cluster manager can be asked to create and manage.
func (ClusterAvailableVersion) MarshalJSON ¶
func (c ClusterAvailableVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterAvailableVersion.
func (*ClusterAvailableVersion) UnmarshalJSON ¶
func (c *ClusterAvailableVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterAvailableVersion.
type ClusterCapacity ¶
type ClusterCapacity struct { // The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. AvailableApplianceStorageGB *int64 // The remaining number of cores that are available in this cluster for workload use. AvailableCoreCount *int64 // The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. AvailableHostStorageGB *int64 // The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. AvailableMemoryGB *int64 // The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. TotalApplianceStorageGB *int64 // The total number of cores that are supported by this cluster for workload use. TotalCoreCount *int64 // The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. TotalHostStorageGB *int64 // The total memory supported by this cluster for workload use. Measured in gibibytes. TotalMemoryGB *int64 }
ClusterCapacity represents various details regarding compute capacity.
func (ClusterCapacity) MarshalJSON ¶
func (c ClusterCapacity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCapacity.
func (*ClusterCapacity) UnmarshalJSON ¶
func (c *ClusterCapacity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCapacity.
type ClusterConnectionStatus ¶
type ClusterConnectionStatus string
ClusterConnectionStatus - The latest heartbeat status between the cluster manager and the cluster.
const ( ClusterConnectionStatusConnected ClusterConnectionStatus = "Connected" ClusterConnectionStatusDisconnected ClusterConnectionStatus = "Disconnected" ClusterConnectionStatusTimeout ClusterConnectionStatus = "Timeout" ClusterConnectionStatusUndefined ClusterConnectionStatus = "Undefined" )
func PossibleClusterConnectionStatusValues ¶
func PossibleClusterConnectionStatusValues() []ClusterConnectionStatus
PossibleClusterConnectionStatusValues returns the possible values for the ClusterConnectionStatus const type.
type ClusterContinueUpdateVersionMachineGroupTargetingMode ¶ added in v1.2.0
type ClusterContinueUpdateVersionMachineGroupTargetingMode string
ClusterContinueUpdateVersionMachineGroupTargetingMode - The mode by which the cluster will target the next grouping of servers to continue the update.
const (
ClusterContinueUpdateVersionMachineGroupTargetingModeAlphaByRack ClusterContinueUpdateVersionMachineGroupTargetingMode = "AlphaByRack"
)
func PossibleClusterContinueUpdateVersionMachineGroupTargetingModeValues ¶ added in v1.2.0
func PossibleClusterContinueUpdateVersionMachineGroupTargetingModeValues() []ClusterContinueUpdateVersionMachineGroupTargetingMode
PossibleClusterContinueUpdateVersionMachineGroupTargetingModeValues returns the possible values for the ClusterContinueUpdateVersionMachineGroupTargetingMode const type.
type ClusterContinueUpdateVersionParameters ¶ added in v1.2.0
type ClusterContinueUpdateVersionParameters struct { // The mode by which the cluster will target the next grouping of servers to continue the update. MachineGroupTargetingMode *ClusterContinueUpdateVersionMachineGroupTargetingMode }
ClusterContinueUpdateVersionParameters represents the body of the request to continue the update of a cluster version.
func (ClusterContinueUpdateVersionParameters) MarshalJSON ¶ added in v1.2.0
func (c ClusterContinueUpdateVersionParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterContinueUpdateVersionParameters.
func (*ClusterContinueUpdateVersionParameters) UnmarshalJSON ¶ added in v1.2.0
func (c *ClusterContinueUpdateVersionParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterContinueUpdateVersionParameters.
type ClusterDeployParameters ¶
type ClusterDeployParameters struct { // The names of bare metal machines in the cluster that should be skipped during environment validation. SkipValidationsForMachines []*string }
ClusterDeployParameters represents the body of the request to deploy cluster.
func (ClusterDeployParameters) MarshalJSON ¶
func (c ClusterDeployParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterDeployParameters.
func (*ClusterDeployParameters) UnmarshalJSON ¶
func (c *ClusterDeployParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterDeployParameters.
type ClusterDetailedStatus ¶
type ClusterDetailedStatus string
ClusterDetailedStatus - The current detailed status of the cluster.
const ( ClusterDetailedStatusDegraded ClusterDetailedStatus = "Degraded" ClusterDetailedStatusDeleting ClusterDetailedStatus = "Deleting" ClusterDetailedStatusDeploying ClusterDetailedStatus = "Deploying" ClusterDetailedStatusDisconnected ClusterDetailedStatus = "Disconnected" ClusterDetailedStatusFailed ClusterDetailedStatus = "Failed" ClusterDetailedStatusPendingDeployment ClusterDetailedStatus = "PendingDeployment" ClusterDetailedStatusRunning ClusterDetailedStatus = "Running" ClusterDetailedStatusUpdatePaused ClusterDetailedStatus = "UpdatePaused" ClusterDetailedStatusUpdating ClusterDetailedStatus = "Updating" )
func PossibleClusterDetailedStatusValues ¶
func PossibleClusterDetailedStatusValues() []ClusterDetailedStatus
PossibleClusterDetailedStatusValues returns the possible values for the ClusterDetailedStatus const type.
type ClusterList ¶
type ClusterList struct { // The link used to get the next page of operations. NextLink *string // The list of clusters. Value []*Cluster }
ClusterList represents a list of clusters.
func (ClusterList) MarshalJSON ¶
func (c ClusterList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterList.
func (*ClusterList) UnmarshalJSON ¶
func (c *ClusterList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterList.
type ClusterManager ¶
type ClusterManager struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *ClusterManagerProperties // The identity of the cluster manager. Identity *ManagedServiceIdentity // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ClusterManager represents a control-plane to manage one or more on-premises clusters.
func (ClusterManager) MarshalJSON ¶
func (c ClusterManager) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterManager.
func (*ClusterManager) UnmarshalJSON ¶
func (c *ClusterManager) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterManager.
type ClusterManagerConnectionStatus ¶
type ClusterManagerConnectionStatus string
ClusterManagerConnectionStatus - The latest connectivity status between cluster manager and the cluster.
const ( ClusterManagerConnectionStatusConnected ClusterManagerConnectionStatus = "Connected" ClusterManagerConnectionStatusUnreachable ClusterManagerConnectionStatus = "Unreachable" )
func PossibleClusterManagerConnectionStatusValues ¶
func PossibleClusterManagerConnectionStatusValues() []ClusterManagerConnectionStatus
PossibleClusterManagerConnectionStatusValues returns the possible values for the ClusterManagerConnectionStatus const type.
type ClusterManagerDetailedStatus ¶
type ClusterManagerDetailedStatus string
ClusterManagerDetailedStatus - The detailed status that provides additional information about the cluster manager.
const ( ClusterManagerDetailedStatusAvailable ClusterManagerDetailedStatus = "Available" ClusterManagerDetailedStatusError ClusterManagerDetailedStatus = "Error" ClusterManagerDetailedStatusProvisioning ClusterManagerDetailedStatus = "Provisioning" ClusterManagerDetailedStatusProvisioningFailed ClusterManagerDetailedStatus = "ProvisioningFailed" ClusterManagerDetailedStatusUpdateFailed ClusterManagerDetailedStatus = "UpdateFailed" ClusterManagerDetailedStatusUpdating ClusterManagerDetailedStatus = "Updating" )
func PossibleClusterManagerDetailedStatusValues ¶
func PossibleClusterManagerDetailedStatusValues() []ClusterManagerDetailedStatus
PossibleClusterManagerDetailedStatusValues returns the possible values for the ClusterManagerDetailedStatus const type.
type ClusterManagerList ¶
type ClusterManagerList struct { // The link used to get the next page of operations. NextLink *string // The list of cluster managers. Value []*ClusterManager }
ClusterManagerList represents a list of cluster manager objects.
func (ClusterManagerList) MarshalJSON ¶
func (c ClusterManagerList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterManagerList.
func (*ClusterManagerList) UnmarshalJSON ¶
func (c *ClusterManagerList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterManagerList.
type ClusterManagerPatchParameters ¶
type ClusterManagerPatchParameters struct { // The identity for the resource. Identity *ManagedServiceIdentity // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
ClusterManagerPatchParameters represents the body of the request to patch the cluster properties.
func (ClusterManagerPatchParameters) MarshalJSON ¶
func (c ClusterManagerPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterManagerPatchParameters.
func (*ClusterManagerPatchParameters) UnmarshalJSON ¶
func (c *ClusterManagerPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterManagerPatchParameters.
type ClusterManagerProperties ¶
type ClusterManagerProperties struct { // REQUIRED; The resource ID of the fabric controller that has one to one mapping with the cluster manager. FabricControllerID *string // The resource ID of the Log Analytics workspace that is used for the logs collection. AnalyticsWorkspaceID *string // Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future // version. The Azure availability zones within the region that will be used // to support the cluster manager resource. AvailabilityZones []*string // The configuration of the managed resource group associated with the resource. ManagedResourceGroupConfiguration *ManagedResourceGroupConfiguration // Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future // version. The size of the Azure virtual machines to use for hosting the // cluster manager resource. VMSize *string // READ-ONLY; The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster // resource. ClusterVersions []*ClusterAvailableVersion // READ-ONLY; The detailed status that provides additional information about the cluster manager. DetailedStatus *ClusterManagerDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The extended location (custom location) that represents the cluster manager's control plane location. This extended // location is used when creating cluster and rack manifest resources. ManagerExtendedLocation *ExtendedLocation // READ-ONLY; The provisioning state of the cluster manager. ProvisioningState *ClusterManagerProvisioningState }
ClusterManagerProperties represents the properties of a cluster manager.
func (ClusterManagerProperties) MarshalJSON ¶
func (c ClusterManagerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterManagerProperties.
func (*ClusterManagerProperties) UnmarshalJSON ¶
func (c *ClusterManagerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterManagerProperties.
type ClusterManagerProvisioningState ¶
type ClusterManagerProvisioningState string
ClusterManagerProvisioningState - The provisioning state of the cluster manager.
const ( ClusterManagerProvisioningStateAccepted ClusterManagerProvisioningState = "Accepted" ClusterManagerProvisioningStateCanceled ClusterManagerProvisioningState = "Canceled" ClusterManagerProvisioningStateFailed ClusterManagerProvisioningState = "Failed" ClusterManagerProvisioningStateProvisioning ClusterManagerProvisioningState = "Provisioning" ClusterManagerProvisioningStateSucceeded ClusterManagerProvisioningState = "Succeeded" ClusterManagerProvisioningStateUpdating ClusterManagerProvisioningState = "Updating" )
func PossibleClusterManagerProvisioningStateValues ¶
func PossibleClusterManagerProvisioningStateValues() []ClusterManagerProvisioningState
PossibleClusterManagerProvisioningStateValues returns the possible values for the ClusterManagerProvisioningState const type.
type ClusterManagersClient ¶
type ClusterManagersClient struct {
// contains filtered or unexported fields
}
ClusterManagersClient contains the methods for the ClusterManagers group. Don't use this type directly, use NewClusterManagersClient() instead.
func NewClusterManagersClient ¶
func NewClusterManagersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterManagersClient, error)
NewClusterManagersClient creates a new instance of ClusterManagersClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClusterManagersClient) BeginCreateOrUpdate ¶
func (client *ClusterManagersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterManagerName string, clusterManagerParameters ClusterManager, options *ClusterManagersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClusterManagersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new cluster manager or update properties of the cluster manager if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterManagerName - The name of the cluster manager.
- clusterManagerParameters - The request body.
- options - ClusterManagersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClusterManagersClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateClusterManager) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClusterManagersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterManagerName", armnetworkcloud.ClusterManager{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, Identity: &armnetworkcloud.ManagedServiceIdentity{ Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), }, Properties: &armnetworkcloud.ClusterManagerProperties{ AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ Name: to.Ptr("my-managed-rg"), Location: to.Ptr("East US"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterManager = armnetworkcloud.ClusterManager{ // Name: to.Ptr("clusterManagerName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ // { // SupportExpiryDate: to.Ptr("2023-04-29"), // TargetClusterVersion: to.Ptr("1.0.0"), // }, // { // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateOrUpdateClusterManagerWithUserAssignedIdentity) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_Create_Uami.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClusterManagersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterManagerName", armnetworkcloud.ClusterManager{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, Identity: &armnetworkcloud.ManagedServiceIdentity{ Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": {}, }, }, Properties: &armnetworkcloud.ClusterManagerProperties{ AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ Name: to.Ptr("my-managed-rg"), Location: to.Ptr("East US"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterManager = armnetworkcloud.ClusterManager{ // Name: to.Ptr("clusterManagerName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // ClientID: to.Ptr("200e0000-e89b-12d3-a456-426655440000"), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // }, // }, // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ // { // SupportExpiryDate: to.Ptr("2023-04-29"), // TargetClusterVersion: to.Ptr("1.0.0"), // }, // { // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), // }, // } }
Output:
func (*ClusterManagersClient) BeginDelete ¶
func (client *ClusterManagersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterManagerName string, options *ClusterManagersClientBeginDeleteOptions) (*runtime.Poller[ClusterManagersClientDeleteResponse], error)
BeginDelete - Delete the provided cluster manager. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterManagerName - The name of the cluster manager.
- options - ClusterManagersClientBeginDeleteOptions contains the optional parameters for the ClusterManagersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClusterManagersClient().BeginDelete(ctx, "resourceGroupName", "clusterManagerName", 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 (*ClusterManagersClient) Get ¶
func (client *ClusterManagersClient) Get(ctx context.Context, resourceGroupName string, clusterManagerName string, options *ClusterManagersClientGetOptions) (ClusterManagersClientGetResponse, error)
Get - Get the properties of the provided cluster manager. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterManagerName - The name of the cluster manager.
- options - ClusterManagersClientGetOptions contains the optional parameters for the ClusterManagersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterManagersClient().Get(ctx, "resourceGroupName", "clusterManagerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterManager = armnetworkcloud.ClusterManager{ // Name: to.Ptr("clusterManagerName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ // { // SupportExpiryDate: to.Ptr("2023-04-29"), // TargetClusterVersion: to.Ptr("1.0.0"), // }, // { // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), // }, // } }
Output:
func (*ClusterManagersClient) NewListByResourceGroupPager ¶
func (client *ClusterManagersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClusterManagersClientListByResourceGroupOptions) *runtime.Pager[ClusterManagersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of cluster managers in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ClusterManagersClientListByResourceGroupOptions contains the optional parameters for the ClusterManagersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClusterManagersClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterManagerList = armnetworkcloud.ClusterManagerList{ // Value: []*armnetworkcloud.ClusterManager{ // { // Name: to.Ptr("clusterManagerName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ // { // SupportExpiryDate: to.Ptr("2023-04-29"), // TargetClusterVersion: to.Ptr("1.0.0"), // }, // { // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*ClusterManagersClient) NewListBySubscriptionPager ¶
func (client *ClusterManagersClient) NewListBySubscriptionPager(options *ClusterManagersClientListBySubscriptionOptions) *runtime.Pager[ClusterManagersClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of cluster managers in the provided subscription.
Generated from API version 2024-07-01
- options - ClusterManagersClientListBySubscriptionOptions contains the optional parameters for the ClusterManagersClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClusterManagersClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterManagerList = armnetworkcloud.ClusterManagerList{ // Value: []*armnetworkcloud.ClusterManager{ // { // Name: to.Ptr("clusterManagerName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeSystemAssigned), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // TenantID: to.Ptr("199e9999-e89b-12d3-a456-426655441111"), // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ // { // SupportExpiryDate: to.Ptr("2023-04-29"), // TargetClusterVersion: to.Ptr("1.0.0"), // }, // { // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*ClusterManagersClient) Update ¶
func (client *ClusterManagersClient) Update(ctx context.Context, resourceGroupName string, clusterManagerName string, clusterManagerUpdateParameters ClusterManagerPatchParameters, options *ClusterManagersClientUpdateOptions) (ClusterManagersClientUpdateResponse, error)
Update - Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterManagerName - The name of the cluster manager.
- clusterManagerUpdateParameters - The request body.
- options - ClusterManagersClientUpdateOptions contains the optional parameters for the ClusterManagersClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterManagers_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterManagersClient().Update(ctx, "resourceGroupName", "clusterManagerName", armnetworkcloud.ClusterManagerPatchParameters{ Identity: &armnetworkcloud.ManagedServiceIdentity{ Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": nil, "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": {}, }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterManager = armnetworkcloud.ClusterManager{ // Name: to.Ptr("clusterManagerName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusterManagers"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": &armnetworkcloud.UserAssignedIdentity{ // ClientID: to.Ptr("200e0000-e89b-12d3-a456-426655440000"), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // }, // }, // }, // Properties: &armnetworkcloud.ClusterManagerProperties{ // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // ClusterVersions: []*armnetworkcloud.ClusterAvailableVersion{ // { // SupportExpiryDate: to.Ptr("2023-04-29"), // TargetClusterVersion: to.Ptr("1.0.0"), // }, // { // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterManagerDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("cluster manager is up and running"), // FabricControllerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManagerExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterManagerProvisioningStateSucceeded), // }, // } }
Output:
type ClusterManagersClientBeginCreateOrUpdateOptions ¶
type ClusterManagersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClusterManagersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClusterManagersClient.BeginCreateOrUpdate method.
type ClusterManagersClientBeginDeleteOptions ¶
type ClusterManagersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClusterManagersClientBeginDeleteOptions contains the optional parameters for the ClusterManagersClient.BeginDelete method.
type ClusterManagersClientCreateOrUpdateResponse ¶
type ClusterManagersClientCreateOrUpdateResponse struct { // ClusterManager represents a control-plane to manage one or more on-premises clusters. ClusterManager }
ClusterManagersClientCreateOrUpdateResponse contains the response from method ClusterManagersClient.BeginCreateOrUpdate.
type ClusterManagersClientDeleteResponse ¶
type ClusterManagersClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
ClusterManagersClientDeleteResponse contains the response from method ClusterManagersClient.BeginDelete.
type ClusterManagersClientGetOptions ¶
type ClusterManagersClientGetOptions struct { }
ClusterManagersClientGetOptions contains the optional parameters for the ClusterManagersClient.Get method.
type ClusterManagersClientGetResponse ¶
type ClusterManagersClientGetResponse struct { // ClusterManager represents a control-plane to manage one or more on-premises clusters. ClusterManager }
ClusterManagersClientGetResponse contains the response from method ClusterManagersClient.Get.
type ClusterManagersClientListByResourceGroupOptions ¶
type ClusterManagersClientListByResourceGroupOptions struct { }
ClusterManagersClientListByResourceGroupOptions contains the optional parameters for the ClusterManagersClient.NewListByResourceGroupPager method.
type ClusterManagersClientListByResourceGroupResponse ¶
type ClusterManagersClientListByResourceGroupResponse struct { // ClusterManagerList represents a list of cluster manager objects. ClusterManagerList }
ClusterManagersClientListByResourceGroupResponse contains the response from method ClusterManagersClient.NewListByResourceGroupPager.
type ClusterManagersClientListBySubscriptionOptions ¶
type ClusterManagersClientListBySubscriptionOptions struct { }
ClusterManagersClientListBySubscriptionOptions contains the optional parameters for the ClusterManagersClient.NewListBySubscriptionPager method.
type ClusterManagersClientListBySubscriptionResponse ¶
type ClusterManagersClientListBySubscriptionResponse struct { // ClusterManagerList represents a list of cluster manager objects. ClusterManagerList }
ClusterManagersClientListBySubscriptionResponse contains the response from method ClusterManagersClient.NewListBySubscriptionPager.
type ClusterManagersClientUpdateOptions ¶
type ClusterManagersClientUpdateOptions struct { }
ClusterManagersClientUpdateOptions contains the optional parameters for the ClusterManagersClient.Update method.
type ClusterManagersClientUpdateResponse ¶
type ClusterManagersClientUpdateResponse struct { // ClusterManager represents a control-plane to manage one or more on-premises clusters. ClusterManager }
ClusterManagersClientUpdateResponse contains the response from method ClusterManagersClient.Update.
type ClusterMetricsConfiguration ¶
type ClusterMetricsConfiguration struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *ClusterMetricsConfigurationProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ClusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster.
func (ClusterMetricsConfiguration) MarshalJSON ¶
func (c ClusterMetricsConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMetricsConfiguration.
func (*ClusterMetricsConfiguration) UnmarshalJSON ¶
func (c *ClusterMetricsConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMetricsConfiguration.
type ClusterMetricsConfigurationDetailedStatus ¶
type ClusterMetricsConfigurationDetailedStatus string
ClusterMetricsConfigurationDetailedStatus - The more detailed status of the metrics configuration.
const ( ClusterMetricsConfigurationDetailedStatusApplied ClusterMetricsConfigurationDetailedStatus = "Applied" ClusterMetricsConfigurationDetailedStatusError ClusterMetricsConfigurationDetailedStatus = "Error" ClusterMetricsConfigurationDetailedStatusProcessing ClusterMetricsConfigurationDetailedStatus = "Processing" )
func PossibleClusterMetricsConfigurationDetailedStatusValues ¶
func PossibleClusterMetricsConfigurationDetailedStatusValues() []ClusterMetricsConfigurationDetailedStatus
PossibleClusterMetricsConfigurationDetailedStatusValues returns the possible values for the ClusterMetricsConfigurationDetailedStatus const type.
type ClusterMetricsConfigurationList ¶
type ClusterMetricsConfigurationList struct { // The link used to get the next page of operations. NextLink *string // The list of metrics configurations. Value []*ClusterMetricsConfiguration }
ClusterMetricsConfigurationList represents a list of metrics configuration of the cluster.
func (ClusterMetricsConfigurationList) MarshalJSON ¶
func (c ClusterMetricsConfigurationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMetricsConfigurationList.
func (*ClusterMetricsConfigurationList) UnmarshalJSON ¶
func (c *ClusterMetricsConfigurationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMetricsConfigurationList.
type ClusterMetricsConfigurationPatchParameters ¶
type ClusterMetricsConfigurationPatchParameters struct { // The list of the resource properties. Properties *ClusterMetricsConfigurationPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
ClusterMetricsConfigurationPatchParameters represents the body of the request to patch the metrics configuration of cluster.
func (ClusterMetricsConfigurationPatchParameters) MarshalJSON ¶
func (c ClusterMetricsConfigurationPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMetricsConfigurationPatchParameters.
func (*ClusterMetricsConfigurationPatchParameters) UnmarshalJSON ¶
func (c *ClusterMetricsConfigurationPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMetricsConfigurationPatchParameters.
type ClusterMetricsConfigurationPatchProperties ¶
type ClusterMetricsConfigurationPatchProperties struct { // The interval in minutes by which metrics will be collected. CollectionInterval *int64 // The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. EnabledMetrics []*string }
ClusterMetricsConfigurationPatchProperties represents the properties of metrics configuration for the cluster for patching.
func (ClusterMetricsConfigurationPatchProperties) MarshalJSON ¶
func (c ClusterMetricsConfigurationPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMetricsConfigurationPatchProperties.
func (*ClusterMetricsConfigurationPatchProperties) UnmarshalJSON ¶
func (c *ClusterMetricsConfigurationPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMetricsConfigurationPatchProperties.
type ClusterMetricsConfigurationProperties ¶
type ClusterMetricsConfigurationProperties struct { // REQUIRED; The interval in minutes by which metrics will be collected. CollectionInterval *int64 // The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. EnabledMetrics []*string // READ-ONLY; The more detailed status of the metrics configuration. DetailedStatus *ClusterMetricsConfigurationDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The list of metrics that are available for the cluster but disabled at the moment. DisabledMetrics []*string // READ-ONLY; The provisioning state of the metrics configuration. ProvisioningState *ClusterMetricsConfigurationProvisioningState }
ClusterMetricsConfigurationProperties represents the properties of metrics configuration for the cluster.
func (ClusterMetricsConfigurationProperties) MarshalJSON ¶
func (c ClusterMetricsConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMetricsConfigurationProperties.
func (*ClusterMetricsConfigurationProperties) UnmarshalJSON ¶
func (c *ClusterMetricsConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMetricsConfigurationProperties.
type ClusterMetricsConfigurationProvisioningState ¶
type ClusterMetricsConfigurationProvisioningState string
ClusterMetricsConfigurationProvisioningState - The provisioning state of the metrics configuration.
const ( ClusterMetricsConfigurationProvisioningStateAccepted ClusterMetricsConfigurationProvisioningState = "Accepted" ClusterMetricsConfigurationProvisioningStateCanceled ClusterMetricsConfigurationProvisioningState = "Canceled" ClusterMetricsConfigurationProvisioningStateFailed ClusterMetricsConfigurationProvisioningState = "Failed" ClusterMetricsConfigurationProvisioningStateProvisioning ClusterMetricsConfigurationProvisioningState = "Provisioning" ClusterMetricsConfigurationProvisioningStateSucceeded ClusterMetricsConfigurationProvisioningState = "Succeeded" )
func PossibleClusterMetricsConfigurationProvisioningStateValues ¶
func PossibleClusterMetricsConfigurationProvisioningStateValues() []ClusterMetricsConfigurationProvisioningState
PossibleClusterMetricsConfigurationProvisioningStateValues returns the possible values for the ClusterMetricsConfigurationProvisioningState const type.
type ClusterPatchParameters ¶
type ClusterPatchParameters struct { // The identity for the resource. Identity *ManagedServiceIdentity // The list of the resource properties. Properties *ClusterPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
ClusterPatchParameters represents the body of the request to patch the cluster properties.
func (ClusterPatchParameters) MarshalJSON ¶
func (c ClusterPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterPatchParameters.
func (*ClusterPatchParameters) UnmarshalJSON ¶
func (c *ClusterPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPatchParameters.
type ClusterPatchProperties ¶
type ClusterPatchProperties struct { // The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a // multi-rack cluster. AggregatorOrSingleRackDefinition *RackDefinition // The customer-provided location information to identify where the cluster resides. ClusterLocation *string // The service principal to be used by the cluster during Arc Appliance installation. ClusterServicePrincipal *ServicePrincipalInformation // The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. CommandOutputSettings *CommandOutputSettings // The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. ComputeDeploymentThreshold *ValidationThreshold // The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. ComputeRackDefinitions []*RackDefinition // The settings for cluster runtime protection. RuntimeProtectionConfiguration *RuntimeProtectionConfiguration // The configuration for use of a key vault to store secrets for later retrieval by the operator. SecretArchive *ClusterSecretArchive // The strategy for updating the cluster. UpdateStrategy *ClusterUpdateStrategy }
ClusterPatchProperties represents the properties of the cluster for patching.
func (ClusterPatchProperties) MarshalJSON ¶
func (c ClusterPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterPatchProperties.
func (*ClusterPatchProperties) UnmarshalJSON ¶
func (c *ClusterPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPatchProperties.
type ClusterProperties ¶
type ClusterProperties struct { // REQUIRED; The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator // rack in a multi-rack cluster. AggregatorOrSingleRackDefinition *RackDefinition // REQUIRED; The type of rack configuration for the cluster. ClusterType *ClusterType // REQUIRED; The current runtime version of the cluster. ClusterVersion *string // REQUIRED; The resource ID of the Network Fabric associated with the cluster. NetworkFabricID *string // The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. AnalyticsWorkspaceID *string // The customer-provided location information to identify where the cluster resides. ClusterLocation *string // The service principal to be used by the cluster during Arc Appliance installation. ClusterServicePrincipal *ServicePrincipalInformation // The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. CommandOutputSettings *CommandOutputSettings // The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. ComputeDeploymentThreshold *ValidationThreshold // The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. ComputeRackDefinitions []*RackDefinition // The configuration of the managed resource group associated with the resource. ManagedResourceGroupConfiguration *ManagedResourceGroupConfiguration // The settings for cluster runtime protection. RuntimeProtectionConfiguration *RuntimeProtectionConfiguration // The configuration for use of a key vault to store secrets for later retrieval by the operator. SecretArchive *ClusterSecretArchive // The strategy for updating the cluster. UpdateStrategy *ClusterUpdateStrategy // READ-ONLY; The list of cluster runtime version upgrades available for this cluster. AvailableUpgradeVersions []*ClusterAvailableUpgradeVersion // READ-ONLY; The capacity supported by this cluster. ClusterCapacity *ClusterCapacity // READ-ONLY; The latest heartbeat status between the cluster manager and the cluster. ClusterConnectionStatus *ClusterConnectionStatus // READ-ONLY; The extended location (custom location) that represents the cluster's control plane location. This extended // location is used to route the requests of child objects of the cluster that are handled by // the platform operator. ClusterExtendedLocation *ExtendedLocation // READ-ONLY; The latest connectivity status between cluster manager and the cluster. ClusterManagerConnectionStatus *ClusterManagerConnectionStatus // READ-ONLY; The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the // cluster is created. ClusterManagerID *string // READ-ONLY; The current detailed status of the cluster. DetailedStatus *ClusterDetailedStatus // READ-ONLY; The descriptive message about the detailed status. DetailedStatusMessage *string // READ-ONLY; Field Deprecated. This field will not be populated in an upcoming version. The extended location (custom location) // that represents the Hybrid AKS control plane location. This extended location is used // when creating provisioned clusters (Hybrid AKS clusters). HybridAksExtendedLocation *ExtendedLocation // READ-ONLY; The count of Manual Action Taken (MAT) events that have not been validated. ManualActionCount *int64 // READ-ONLY; The provisioning state of the cluster. ProvisioningState *ClusterProvisioningState // READ-ONLY; The support end date of the runtime version of the cluster. SupportExpiryDate *string // READ-ONLY; The list of workload resource IDs that are hosted within this cluster. WorkloadResourceIDs []*string }
ClusterProperties represents the properties of a cluster.
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 ClusterProvisioningState ¶
type ClusterProvisioningState string
ClusterProvisioningState - The provisioning state of the cluster.
const ( ClusterProvisioningStateAccepted ClusterProvisioningState = "Accepted" ClusterProvisioningStateCanceled ClusterProvisioningState = "Canceled" ClusterProvisioningStateFailed ClusterProvisioningState = "Failed" ClusterProvisioningStateSucceeded ClusterProvisioningState = "Succeeded" ClusterProvisioningStateUpdating ClusterProvisioningState = "Updating" ClusterProvisioningStateValidating ClusterProvisioningState = "Validating" )
func PossibleClusterProvisioningStateValues ¶
func PossibleClusterProvisioningStateValues() []ClusterProvisioningState
PossibleClusterProvisioningStateValues returns the possible values for the ClusterProvisioningState const type.
type ClusterScanRuntimeParameters ¶ added in v1.2.0
type ClusterScanRuntimeParameters struct { // The choice of if the scan operation should run the scan. ScanActivity *ClusterScanRuntimeParametersScanActivity }
ClusterScanRuntimeParameters defines the parameters for the cluster scan runtime operation.
func (ClusterScanRuntimeParameters) MarshalJSON ¶ added in v1.2.0
func (c ClusterScanRuntimeParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterScanRuntimeParameters.
func (*ClusterScanRuntimeParameters) UnmarshalJSON ¶ added in v1.2.0
func (c *ClusterScanRuntimeParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterScanRuntimeParameters.
type ClusterScanRuntimeParametersScanActivity ¶ added in v1.2.0
type ClusterScanRuntimeParametersScanActivity string
ClusterScanRuntimeParametersScanActivity - The choice of if the scan operation should run the scan.
const ( ClusterScanRuntimeParametersScanActivityScan ClusterScanRuntimeParametersScanActivity = "Scan" ClusterScanRuntimeParametersScanActivitySkip ClusterScanRuntimeParametersScanActivity = "Skip" )
func PossibleClusterScanRuntimeParametersScanActivityValues ¶ added in v1.2.0
func PossibleClusterScanRuntimeParametersScanActivityValues() []ClusterScanRuntimeParametersScanActivity
PossibleClusterScanRuntimeParametersScanActivityValues returns the possible values for the ClusterScanRuntimeParametersScanActivity const type.
type ClusterSecretArchive ¶ added in v1.2.0
type ClusterSecretArchive struct { // REQUIRED; The resource ID of the key vault to archive the secrets of the cluster. KeyVaultID *string // The indicator if the specified key vault should be used to archive the secrets of the cluster. UseKeyVault *ClusterSecretArchiveEnabled }
ClusterSecretArchive configures the key vault to archive the secrets of the cluster for later retrieval.
func (ClusterSecretArchive) MarshalJSON ¶ added in v1.2.0
func (c ClusterSecretArchive) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterSecretArchive.
func (*ClusterSecretArchive) UnmarshalJSON ¶ added in v1.2.0
func (c *ClusterSecretArchive) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterSecretArchive.
type ClusterSecretArchiveEnabled ¶ added in v1.2.0
type ClusterSecretArchiveEnabled string
ClusterSecretArchiveEnabled - The indicator if the specified key vault should be used to archive the secrets of the cluster.
const ( ClusterSecretArchiveEnabledFalse ClusterSecretArchiveEnabled = "False" ClusterSecretArchiveEnabledTrue ClusterSecretArchiveEnabled = "True" )
func PossibleClusterSecretArchiveEnabledValues ¶ added in v1.2.0
func PossibleClusterSecretArchiveEnabledValues() []ClusterSecretArchiveEnabled
PossibleClusterSecretArchiveEnabledValues returns the possible values for the ClusterSecretArchiveEnabled const type.
type ClusterType ¶
type ClusterType string
ClusterType - The type of rack configuration for the cluster.
const ( ClusterTypeMultiRack ClusterType = "MultiRack" ClusterTypeSingleRack ClusterType = "SingleRack" )
func PossibleClusterTypeValues ¶
func PossibleClusterTypeValues() []ClusterType
PossibleClusterTypeValues returns the possible values for the ClusterType const type.
type ClusterUpdateStrategy ¶ added in v1.2.0
type ClusterUpdateStrategy struct { // REQUIRED; The mode of operation for runtime protection. StrategyType *ClusterUpdateStrategyType // REQUIRED; Selection of how the threshold should be evaluated. ThresholdType *ValidationThresholdType // REQUIRED; The numeric threshold value. ThresholdValue *int64 // maximum number of machines in the increment. Defaults to the whole increment // size. MaxUnavailable *int64 // The time to wait between the increments of update defined by the strategy. WaitTimeMinutes *int64 }
ClusterUpdateStrategy represents the strategy for updating the cluster.
func (ClusterUpdateStrategy) MarshalJSON ¶ added in v1.2.0
func (c ClusterUpdateStrategy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterUpdateStrategy.
func (*ClusterUpdateStrategy) UnmarshalJSON ¶ added in v1.2.0
func (c *ClusterUpdateStrategy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateStrategy.
type ClusterUpdateStrategyType ¶ added in v1.2.0
type ClusterUpdateStrategyType string
ClusterUpdateStrategyType - The mode of operation for runtime protection.
const ( ClusterUpdateStrategyTypePauseAfterRack ClusterUpdateStrategyType = "PauseAfterRack" ClusterUpdateStrategyTypeRack ClusterUpdateStrategyType = "Rack" )
func PossibleClusterUpdateStrategyTypeValues ¶ added in v1.2.0
func PossibleClusterUpdateStrategyTypeValues() []ClusterUpdateStrategyType
PossibleClusterUpdateStrategyTypeValues returns the possible values for the ClusterUpdateStrategyType const type.
type ClusterUpdateVersionParameters ¶
type ClusterUpdateVersionParameters struct { // REQUIRED; The version to be applied to the cluster during update. TargetClusterVersion *string }
ClusterUpdateVersionParameters represents the body of the request to update cluster version.
func (ClusterUpdateVersionParameters) MarshalJSON ¶
func (c ClusterUpdateVersionParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterUpdateVersionParameters.
func (*ClusterUpdateVersionParameters) UnmarshalJSON ¶
func (c *ClusterUpdateVersionParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateVersionParameters.
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 ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClustersClient) BeginContinueUpdateVersion ¶ added in v1.2.0
func (client *ClustersClient) BeginContinueUpdateVersion(ctx context.Context, resourceGroupName string, clusterName string, clusterContinueUpdateVersionParameters ClusterContinueUpdateVersionParameters, options *ClustersClientBeginContinueUpdateVersionOptions) (*runtime.Poller[ClustersClientContinueUpdateVersionResponse], error)
BeginContinueUpdateVersion - Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- clusterContinueUpdateVersionParameters - The request body.
- options - ClustersClientBeginContinueUpdateVersionOptions contains the optional parameters for the ClustersClient.BeginContinueUpdateVersion method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_ContinueUpdateVersion.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginContinueUpdateVersion(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterContinueUpdateVersionParameters{ MachineGroupTargetingMode: to.Ptr(armnetworkcloud.ClusterContinueUpdateVersionMachineGroupTargetingModeAlphaByRack), }, 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) BeginCreateOrUpdate ¶
func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, clusterParameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new cluster or update the properties of the cluster if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- clusterParameters - The request body.
- options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.Cluster{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Identity: &armnetworkcloud.ManagedServiceIdentity{ Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": {}, }, }, Properties: &armnetworkcloud.ClusterProperties{ AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ { BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), MachineDetails: to.Ptr("extraDetails"), MachineName: to.Ptr("bmmName1"), RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), }, { BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), MachineDetails: to.Ptr("extraDetails"), MachineName: to.Ptr("bmmName2"), RackSlot: to.Ptr[int64](2), SerialNumber: to.Ptr("BM1219YYY"), }}, NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), RackSerialNumber: to.Ptr("AA1234"), RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ { AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), StorageApplianceName: to.Ptr("vmName"), }}, }, AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), Password: to.Ptr("{password}"), PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), }, ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), ClusterVersion: to.Ptr("1.0.0"), CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ AssociatedIdentity: &armnetworkcloud.IdentitySelector{ IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), }, ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), }, ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), Value: to.Ptr[int64](90), }, ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ { BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ { BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), MachineDetails: to.Ptr("extraDetails"), MachineName: to.Ptr("bmmName1"), RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), }, { BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), MachineDetails: to.Ptr("extraDetails"), MachineName: to.Ptr("bmmName2"), RackSlot: to.Ptr[int64](2), SerialNumber: to.Ptr("BM1219YYY"), }}, NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), RackSerialNumber: to.Ptr("AA1234"), RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ { AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), StorageApplianceName: to.Ptr("vmName"), }}, }}, ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ Name: to.Ptr("my-managed-rg"), Location: to.Ptr("East US"), }, NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), }, SecretArchive: &armnetworkcloud.ClusterSecretArchive{ KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), }, UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ MaxUnavailable: to.Ptr[int64](4), StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), ThresholdValue: to.Ptr[int64](4), WaitTimeMinutes: to.Ptr[int64](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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
func (*ClustersClient) BeginDelete ¶
func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error)
BeginDelete - Delete the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The 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/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "resourceGroupName", "clusterName", 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) BeginDeploy ¶
func (client *ClustersClient) BeginDeploy(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeployOptions) (*runtime.Poller[ClustersClientDeployResponse], error)
BeginDeploy - Deploy the cluster using the rack configuration provided during creation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - ClustersClientBeginDeployOptions contains the optional parameters for the ClustersClient.BeginDeploy method.
Example (DeployCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Deploy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginDeploy(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginDeployOptions{ClusterDeployParameters: &armnetworkcloud.ClusterDeployParameters{}}) 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:
Example (DeployClusterSkippingValidation) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Deploy_SkipValidation.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginDeploy(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginDeployOptions{ClusterDeployParameters: &armnetworkcloud.ClusterDeployParameters{ SkipValidationsForMachines: []*string{ to.Ptr("bmmName1")}, }, }) 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) BeginScanRuntime ¶ added in v1.2.0
func (client *ClustersClient) BeginScanRuntime(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginScanRuntimeOptions) (*runtime.Poller[ClustersClientScanRuntimeResponse], error)
BeginScanRuntime - Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - ClustersClientBeginScanRuntimeOptions contains the optional parameters for the ClustersClient.BeginScanRuntime method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_ScanRuntime.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginScanRuntime(ctx, "resourceGroupName", "clusterName", &armnetworkcloud.ClustersClientBeginScanRuntimeOptions{ClusterScanRuntimeParameters: &armnetworkcloud.ClusterScanRuntimeParameters{ ScanActivity: to.Ptr(armnetworkcloud.ClusterScanRuntimeParametersScanActivityScan), }, }) 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) BeginUpdate ¶
func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, clusterUpdateParameters ClusterPatchParameters, options *ClustersClientBeginUpdateOptions) (*runtime.Poller[ClustersClientUpdateResponse], error)
BeginUpdate - Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- clusterUpdateParameters - The request body.
- options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.
Example (PatchClusterAggregatorOrSingleRackDefinition) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ Properties: &armnetworkcloud.ClusterPatchProperties{ AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ { BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), MachineDetails: to.Ptr("extraDetails"), MachineName: to.Ptr("bmmName1"), RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), }, { BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), MachineDetails: to.Ptr("extraDetails"), MachineName: to.Ptr("bmmName2"), RackSlot: to.Ptr[int64](2), SerialNumber: to.Ptr("BM1219YYY"), }}, NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), RackSerialNumber: to.Ptr("newSerialNumber"), RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ { AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("username"), }, RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), StorageApplianceName: to.Ptr("vmName"), }}, }, ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), Value: to.Ptr[int64](90), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("newSerialNumber"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
Example (PatchClusterCommandOutput) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Patch_CommandOutput.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ Identity: &armnetworkcloud.ManagedServiceIdentity{ Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": nil, "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": {}, }, }, Properties: &armnetworkcloud.ClusterPatchProperties{ CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ AssociatedIdentity: &armnetworkcloud.IdentitySelector{ IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2"), }, ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": &armnetworkcloud.UserAssignedIdentity{ // ClientID: to.Ptr("200e0000-e89b-12d3-a456-426655440000"), // PrincipalID: to.Ptr("321e7654-e89b-12d3-a456-426655449999"), // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
Example (PatchClusterLocation) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Patch_Location.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ Properties: &armnetworkcloud.ClusterPatchProperties{ ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
Example (PatchRuntimeProtectionConfiguration) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Patch_RuntimeProtectionConfiguration.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ Properties: &armnetworkcloud.ClusterPatchProperties{ RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
Example (PatchSecretArchive) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Patch_SecretArchive.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ Properties: &armnetworkcloud.ClusterPatchProperties{ SecretArchive: &armnetworkcloud.ClusterSecretArchive{ KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
Example (PatchUpdateStrategy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Patch_UpdateStrategy.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterPatchParameters{ Properties: &armnetworkcloud.ClusterPatchProperties{ UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ MaxUnavailable: to.Ptr[int64](4), StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), ThresholdValue: to.Ptr[int64](4), WaitTimeMinutes: to.Ptr[int64](10), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
func (*ClustersClient) BeginUpdateVersion ¶
func (client *ClustersClient) BeginUpdateVersion(ctx context.Context, resourceGroupName string, clusterName string, clusterUpdateVersionParameters ClusterUpdateVersionParameters, options *ClustersClientBeginUpdateVersionOptions) (*runtime.Poller[ClustersClientUpdateVersionResponse], error)
BeginUpdateVersion - Update the version of the provided cluster to one of the available supported versions. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- clusterUpdateVersionParameters - The request body.
- options - ClustersClientBeginUpdateVersionOptions contains the optional parameters for the ClustersClient.BeginUpdateVersion method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_UpdateVersion.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdateVersion(ctx, "resourceGroupName", "clusterName", armnetworkcloud.ClusterUpdateVersionParameters{ TargetClusterVersion: to.Ptr("2.0"), }, 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 - Get properties of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The 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/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Get(ctx, "resourceGroupName", "clusterName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armnetworkcloud.Cluster{ // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // } }
Output:
func (*ClustersClient) NewListByResourceGroupPager ¶
func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of clusters in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterList = armnetworkcloud.ClusterList{ // Value: []*armnetworkcloud.Cluster{ // { // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // }}, // } } }
Output:
func (*ClustersClient) NewListBySubscriptionPager ¶
func (client *ClustersClient) NewListBySubscriptionPager(options *ClustersClientListBySubscriptionOptions) *runtime.Pager[ClustersClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of clusters in the provided subscription.
Generated from API version 2024-07-01
- options - ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Clusters_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterList = armnetworkcloud.ClusterList{ // Value: []*armnetworkcloud.Cluster{ // { // Name: to.Ptr("clusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Identity: &armnetworkcloud.ManagedServiceIdentity{ // Type: to.Ptr(armnetworkcloud.ManagedServiceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armnetworkcloud.UserAssignedIdentity{ // "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": &armnetworkcloud.UserAssignedIdentity{ // }, // }, // }, // Properties: &armnetworkcloud.ClusterProperties{ // AggregatorOrSingleRackDefinition: &armnetworkcloud.RackDefinition{ // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }, // AnalyticsWorkspaceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), // AvailableUpgradeVersions: []*armnetworkcloud.ClusterAvailableUpgradeVersion{ // { // ControlImpact: to.Ptr(armnetworkcloud.ControlImpactFalse), // ExpectedDuration: to.Ptr("0:0:30"), // ImpactDescription: to.Ptr("can be done in place"), // SupportExpiryDate: to.Ptr("2025-01-01"), // TargetClusterVersion: to.Ptr("1.0.2"), // WorkloadImpact: to.Ptr(armnetworkcloud.WorkloadImpactFalse), // }}, // ClusterCapacity: &armnetworkcloud.ClusterCapacity{ // AvailableApplianceStorageGB: to.Ptr[int64](3), // AvailableCoreCount: to.Ptr[int64](10), // AvailableHostStorageGB: to.Ptr[int64](20), // AvailableMemoryGB: to.Ptr[int64](20), // TotalApplianceStorageGB: to.Ptr[int64](10), // TotalCoreCount: to.Ptr[int64](10), // TotalHostStorageGB: to.Ptr[int64](10), // TotalMemoryGB: to.Ptr[int64](10), // }, // ClusterConnectionStatus: to.Ptr(armnetworkcloud.ClusterConnectionStatusConnected), // ClusterExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // ClusterLocation: to.Ptr("Foo Street, 3rd Floor, row 9"), // ClusterManagerConnectionStatus: to.Ptr(armnetworkcloud.ClusterManagerConnectionStatusConnected), // ClusterManagerID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusterManagers/clusterManagerName"), // ClusterServicePrincipal: &armnetworkcloud.ServicePrincipalInformation{ // ApplicationID: to.Ptr("12345678-1234-1234-1234-123456789012"), // PrincipalID: to.Ptr("00000008-0004-0004-0004-000000000012"), // TenantID: to.Ptr("80000000-4000-4000-4000-120000000000"), // }, // ClusterType: to.Ptr(armnetworkcloud.ClusterTypeSingleRack), // ClusterVersion: to.Ptr("1.0.0"), // CommandOutputSettings: &armnetworkcloud.CommandOutputSettings{ // AssociatedIdentity: &armnetworkcloud.IdentitySelector{ // IdentityType: to.Ptr(armnetworkcloud.ManagedServiceIdentitySelectorTypeUserAssignedIdentity), // UserAssignedIdentityResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), // }, // ContainerURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), // }, // ComputeDeploymentThreshold: &armnetworkcloud.ValidationThreshold{ // Type: to.Ptr(armnetworkcloud.ValidationThresholdTypePercentSuccess), // Grouping: to.Ptr(armnetworkcloud.ValidationThresholdGroupingPerCluster), // Value: to.Ptr[int64](90), // }, // ComputeRackDefinitions: []*armnetworkcloud.RackDefinition{ // { // BareMetalMachineConfigurationData: []*armnetworkcloud.BareMetalMachineConfigurationData{ // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:FF"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:FF"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName1"), // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // }, // { // BmcConnectionString: to.Ptr("bmcConnectionString"), // BmcCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // BmcMacAddress: to.Ptr("AA:BB:CC:DD:EE:00"), // BootMacAddress: to.Ptr("00:BB:CC:DD:EE:00"), // MachineDetails: to.Ptr("extraDetails"), // MachineName: to.Ptr("bmmName2"), // RackSlot: to.Ptr[int64](2), // SerialNumber: to.Ptr("BM1219YYY"), // }}, // NetworkRackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"), // RackLocation: to.Ptr("Foo Datacenter, Floor 3, Aisle 9, Rack 2"), // RackSerialNumber: to.Ptr("AA1234"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // StorageApplianceConfigurationData: []*armnetworkcloud.StorageApplianceConfigurationData{ // { // AdminCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("username"), // }, // RackSlot: to.Ptr[int64](1), // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceName: to.Ptr("vmName"), // }}, // }}, // DetailedStatus: to.Ptr(armnetworkcloud.ClusterDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Cluster is running and healthy"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // ManualActionCount: to.Ptr[int64](0), // NetworkFabricID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName"), // ProvisioningState: to.Ptr(armnetworkcloud.ClusterProvisioningStateSucceeded), // RuntimeProtectionConfiguration: &armnetworkcloud.RuntimeProtectionConfiguration{ // EnforcementLevel: to.Ptr(armnetworkcloud.RuntimeProtectionEnforcementLevelOnDemand), // }, // SecretArchive: &armnetworkcloud.ClusterSecretArchive{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // UseKeyVault: to.Ptr(armnetworkcloud.ClusterSecretArchiveEnabledTrue), // }, // SupportExpiryDate: to.Ptr("2023-04-29"), // UpdateStrategy: &armnetworkcloud.ClusterUpdateStrategy{ // MaxUnavailable: to.Ptr[int64](4), // StrategyType: to.Ptr(armnetworkcloud.ClusterUpdateStrategyTypeRack), // ThresholdType: to.Ptr(armnetworkcloud.ValidationThresholdTypeCountSuccess), // ThresholdValue: to.Ptr[int64](4), // WaitTimeMinutes: to.Ptr[int64](10), // }, // WorkloadResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")}, // }, // }}, // } } }
Output:
type ClustersClientBeginContinueUpdateVersionOptions ¶ added in v1.2.0
type ClustersClientBeginContinueUpdateVersionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginContinueUpdateVersionOptions contains the optional parameters for the ClustersClient.BeginContinueUpdateVersion method.
type ClustersClientBeginCreateOrUpdateOptions ¶
type ClustersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.
type ClustersClientBeginDeleteOptions ¶
type ClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
type ClustersClientBeginDeployOptions ¶
type ClustersClientBeginDeployOptions struct { // The request body. ClusterDeployParameters *ClusterDeployParameters // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginDeployOptions contains the optional parameters for the ClustersClient.BeginDeploy method.
type ClustersClientBeginScanRuntimeOptions ¶ added in v1.2.0
type ClustersClientBeginScanRuntimeOptions struct { // The request body. ClusterScanRuntimeParameters *ClusterScanRuntimeParameters // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginScanRuntimeOptions contains the optional parameters for the ClustersClient.BeginScanRuntime method.
type ClustersClientBeginUpdateOptions ¶
type ClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.
type ClustersClientBeginUpdateVersionOptions ¶
type ClustersClientBeginUpdateVersionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUpdateVersionOptions contains the optional parameters for the ClustersClient.BeginUpdateVersion method.
type ClustersClientContinueUpdateVersionResponse ¶ added in v1.2.0
type ClustersClientContinueUpdateVersionResponse struct { // The current status of an async operation. OperationStatusResult }
ClustersClientContinueUpdateVersionResponse contains the response from method ClustersClient.BeginContinueUpdateVersion.
type ClustersClientCreateOrUpdateResponse ¶
type ClustersClientCreateOrUpdateResponse struct { // Cluster represents the on-premises Network Cloud cluster. Cluster }
ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate.
type ClustersClientDeleteResponse ¶
type ClustersClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.
type ClustersClientDeployResponse ¶
type ClustersClientDeployResponse struct { // The current status of an async operation. OperationStatusResult }
ClustersClientDeployResponse contains the response from method ClustersClient.BeginDeploy.
type ClustersClientGetOptions ¶
type ClustersClientGetOptions struct { }
ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
type ClustersClientGetResponse ¶
type ClustersClientGetResponse struct { // Cluster represents the on-premises Network Cloud cluster. Cluster }
ClustersClientGetResponse contains the response from method ClustersClient.Get.
type ClustersClientListByResourceGroupOptions ¶
type ClustersClientListByResourceGroupOptions struct { }
ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
type ClustersClientListByResourceGroupResponse ¶
type ClustersClientListByResourceGroupResponse struct { // ClusterList represents a list of clusters. ClusterList }
ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.
type ClustersClientListBySubscriptionOptions ¶
type ClustersClientListBySubscriptionOptions struct { }
ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager method.
type ClustersClientListBySubscriptionResponse ¶
type ClustersClientListBySubscriptionResponse struct { // ClusterList represents a list of clusters. ClusterList }
ClustersClientListBySubscriptionResponse contains the response from method ClustersClient.NewListBySubscriptionPager.
type ClustersClientScanRuntimeResponse ¶ added in v1.2.0
type ClustersClientScanRuntimeResponse struct { // The current status of an async operation. OperationStatusResult }
ClustersClientScanRuntimeResponse contains the response from method ClustersClient.BeginScanRuntime.
type ClustersClientUpdateResponse ¶
type ClustersClientUpdateResponse struct { // Cluster represents the on-premises Network Cloud cluster. Cluster }
ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate.
type ClustersClientUpdateVersionResponse ¶
type ClustersClientUpdateVersionResponse struct { // The current status of an async operation. OperationStatusResult }
ClustersClientUpdateVersionResponse contains the response from method ClustersClient.BeginUpdateVersion.
type CommandOutputSettings ¶ added in v1.2.0
type CommandOutputSettings struct { // The selection of the managed identity to use with this storage account container. The identity type must be either system // assigned or user assigned. AssociatedIdentity *IdentitySelector // The URL of the storage account container that is to be used by the specified identities. ContainerURL *string }
CommandOutputSettings represents the settings for commands run within the cluster such as bare metal machine run read-only commands.
func (CommandOutputSettings) MarshalJSON ¶ added in v1.2.0
func (c CommandOutputSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CommandOutputSettings.
func (*CommandOutputSettings) UnmarshalJSON ¶ added in v1.2.0
func (c *CommandOutputSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CommandOutputSettings.
type Console ¶
type Console struct { // REQUIRED; The extended location of the cluster manager associated with the cluster this virtual machine is created on. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *ConsoleProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Console represents the console of an on-premises Network Cloud virtual machine.
func (Console) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Console.
func (*Console) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Console.
type ConsoleDetailedStatus ¶
type ConsoleDetailedStatus string
ConsoleDetailedStatus - The more detailed status of the console.
const ( ConsoleDetailedStatusError ConsoleDetailedStatus = "Error" ConsoleDetailedStatusReady ConsoleDetailedStatus = "Ready" )
func PossibleConsoleDetailedStatusValues ¶
func PossibleConsoleDetailedStatusValues() []ConsoleDetailedStatus
PossibleConsoleDetailedStatusValues returns the possible values for the ConsoleDetailedStatus const type.
type ConsoleEnabled ¶
type ConsoleEnabled string
ConsoleEnabled - The indicator of whether the console access is enabled.
const ( ConsoleEnabledFalse ConsoleEnabled = "False" ConsoleEnabledTrue ConsoleEnabled = "True" )
func PossibleConsoleEnabledValues ¶
func PossibleConsoleEnabledValues() []ConsoleEnabled
PossibleConsoleEnabledValues returns the possible values for the ConsoleEnabled const type.
type ConsoleList ¶
type ConsoleList struct { // The link used to get the next page of operations. NextLink *string // The list of virtual machine consoles. Value []*Console }
ConsoleList represents a list of virtual machine consoles.
func (ConsoleList) MarshalJSON ¶
func (c ConsoleList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConsoleList.
func (*ConsoleList) UnmarshalJSON ¶
func (c *ConsoleList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConsoleList.
type ConsolePatchParameters ¶
type ConsolePatchParameters struct { // The list of the resource properties. Properties *ConsolePatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
ConsolePatchParameters represents the body of the request to patch the virtual machine console.
func (ConsolePatchParameters) MarshalJSON ¶
func (c ConsolePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConsolePatchParameters.
func (*ConsolePatchParameters) UnmarshalJSON ¶
func (c *ConsolePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConsolePatchParameters.
type ConsolePatchProperties ¶
type ConsolePatchProperties struct { // The indicator of whether the console access is enabled. Enabled *ConsoleEnabled // The date and time after which the key will be disallowed access. Expiration *time.Time // The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private // key for logging in. SSHPublicKey *SSHPublicKey }
ConsolePatchProperties represents the properties of the virtual machine console that can be patched.
func (ConsolePatchProperties) MarshalJSON ¶
func (c ConsolePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConsolePatchProperties.
func (*ConsolePatchProperties) UnmarshalJSON ¶
func (c *ConsolePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConsolePatchProperties.
type ConsoleProperties ¶
type ConsoleProperties struct { // REQUIRED; The indicator of whether the console access is enabled. Enabled *ConsoleEnabled // REQUIRED; The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH // private key for logging in. SSHPublicKey *SSHPublicKey // The date and time after which the key will be disallowed access. Expiration *time.Time // READ-ONLY; The more detailed status of the console. DetailedStatus *ConsoleDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The resource ID of the private link service that is used to provide virtual machine console access. PrivateLinkServiceID *string // READ-ONLY; The provisioning state of the virtual machine console. ProvisioningState *ConsoleProvisioningState // READ-ONLY; The unique identifier for the virtual machine that is used to access the console. VirtualMachineAccessID *string }
ConsoleProperties represents the properties of the virtual machine console.
func (ConsoleProperties) MarshalJSON ¶
func (c ConsoleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConsoleProperties.
func (*ConsoleProperties) UnmarshalJSON ¶
func (c *ConsoleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConsoleProperties.
type ConsoleProvisioningState ¶
type ConsoleProvisioningState string
ConsoleProvisioningState - The provisioning state of the virtual machine console.
const ( ConsoleProvisioningStateAccepted ConsoleProvisioningState = "Accepted" ConsoleProvisioningStateCanceled ConsoleProvisioningState = "Canceled" ConsoleProvisioningStateFailed ConsoleProvisioningState = "Failed" ConsoleProvisioningStateProvisioning ConsoleProvisioningState = "Provisioning" ConsoleProvisioningStateSucceeded ConsoleProvisioningState = "Succeeded" )
func PossibleConsoleProvisioningStateValues ¶
func PossibleConsoleProvisioningStateValues() []ConsoleProvisioningState
PossibleConsoleProvisioningStateValues returns the possible values for the ConsoleProvisioningState const type.
type ConsolesClient ¶
type ConsolesClient struct {
// contains filtered or unexported fields
}
ConsolesClient contains the methods for the Consoles group. Don't use this type directly, use NewConsolesClient() instead.
func NewConsolesClient ¶
func NewConsolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConsolesClient, error)
NewConsolesClient creates a new instance of ConsolesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConsolesClient) BeginCreateOrUpdate ¶
func (client *ConsolesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, consoleParameters Console, options *ConsolesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConsolesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new virtual machine console or update the properties of the existing virtual machine console. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- consoleName - The name of the virtual machine console.
- consoleParameters - The request body.
- options - ConsolesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConsolesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Consoles_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConsolesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "virtualMachineName", "default", armnetworkcloud.Console{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.ConsoleProperties{ Enabled: to.Ptr(armnetworkcloud.ConsoleEnabledTrue), Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-01T01:27:03.008Z"); return t }()), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Console = armnetworkcloud.Console{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines/consoles"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName/consoles/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ConsoleProperties{ // DetailedStatus: to.Ptr(armnetworkcloud.ConsoleDetailedStatusReady), // DetailedStatusMessage: to.Ptr("Console is ready for use"), // Enabled: to.Ptr(armnetworkcloud.ConsoleEnabledTrue), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-01T01:27:03.008Z"); return t}()), // PrivateLinkServiceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateLinkServices/console-pls"), // ProvisioningState: to.Ptr(armnetworkcloud.ConsoleProvisioningStateSucceeded), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // VirtualMachineAccessID: to.Ptr("VirtualMachineAccessId"), // }, // } }
Output:
func (*ConsolesClient) BeginDelete ¶
func (client *ConsolesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, options *ConsolesClientBeginDeleteOptions) (*runtime.Poller[ConsolesClientDeleteResponse], error)
BeginDelete - Delete the provided virtual machine console. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- consoleName - The name of the virtual machine console.
- options - ConsolesClientBeginDeleteOptions contains the optional parameters for the ConsolesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Consoles_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConsolesClient().BeginDelete(ctx, "resourceGroupName", "virtualMachineName", "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 (*ConsolesClient) BeginUpdate ¶
func (client *ConsolesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, consoleUpdateParameters ConsolePatchParameters, options *ConsolesClientBeginUpdateOptions) (*runtime.Poller[ConsolesClientUpdateResponse], error)
BeginUpdate - Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- consoleName - The name of the virtual machine console.
- consoleUpdateParameters - The request body.
- options - ConsolesClientBeginUpdateOptions contains the optional parameters for the ConsolesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Consoles_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConsolesClient().BeginUpdate(ctx, "resourceGroupName", "virtualMachineName", "default", armnetworkcloud.ConsolePatchParameters{ Properties: &armnetworkcloud.ConsolePatchProperties{ Enabled: to.Ptr(armnetworkcloud.ConsoleEnabledTrue), Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-01T01:27:03.008Z"); return t }()), SSHPublicKey: &armnetworkcloud.SSHPublicKey{ KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Console = armnetworkcloud.Console{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines/consoles"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName/consoles/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ConsoleProperties{ // DetailedStatus: to.Ptr(armnetworkcloud.ConsoleDetailedStatusReady), // DetailedStatusMessage: to.Ptr("Console is ready for use"), // Enabled: to.Ptr(armnetworkcloud.ConsoleEnabledTrue), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-01T01:27:03.008Z"); return t}()), // PrivateLinkServiceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateLinkServices/console-pls"), // ProvisioningState: to.Ptr(armnetworkcloud.ConsoleProvisioningStateSucceeded), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // VirtualMachineAccessID: to.Ptr("VirtualMachineAccessId"), // }, // } }
Output:
func (*ConsolesClient) Get ¶
func (client *ConsolesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, consoleName string, options *ConsolesClientGetOptions) (ConsolesClientGetResponse, error)
Get - Get properties of the provided virtual machine console. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- consoleName - The name of the virtual machine console.
- options - ConsolesClientGetOptions contains the optional parameters for the ConsolesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Consoles_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewConsolesClient().Get(ctx, "resourceGroupName", "virtualMachineName", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Console = armnetworkcloud.Console{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines/consoles"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName/consoles/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ConsoleProperties{ // DetailedStatus: to.Ptr(armnetworkcloud.ConsoleDetailedStatusReady), // DetailedStatusMessage: to.Ptr("Console is ready for use"), // Enabled: to.Ptr(armnetworkcloud.ConsoleEnabledTrue), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-01T01:27:03.008Z"); return t}()), // PrivateLinkServiceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateLinkServices/console-pls"), // ProvisioningState: to.Ptr(armnetworkcloud.ConsoleProvisioningStateSucceeded), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // VirtualMachineAccessID: to.Ptr("VirtualMachineAccessId"), // }, // } }
Output:
func (*ConsolesClient) NewListByVirtualMachinePager ¶ added in v0.2.0
func (client *ConsolesClient) NewListByVirtualMachinePager(resourceGroupName string, virtualMachineName string, options *ConsolesClientListByVirtualMachineOptions) *runtime.Pager[ConsolesClientListByVirtualMachineResponse]
NewListByVirtualMachinePager - Get a list of consoles for the provided virtual machine.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - ConsolesClientListByVirtualMachineOptions contains the optional parameters for the ConsolesClient.NewListByVirtualMachinePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Consoles_ListByVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewConsolesClient().NewListByVirtualMachinePager("resourceGroupName", "virtualMachineName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ConsoleList = armnetworkcloud.ConsoleList{ // Value: []*armnetworkcloud.Console{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines/consoles"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName/consoles/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ConsoleProperties{ // DetailedStatus: to.Ptr(armnetworkcloud.ConsoleDetailedStatusReady), // DetailedStatusMessage: to.Ptr("Console is ready for use"), // Enabled: to.Ptr(armnetworkcloud.ConsoleEnabledTrue), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-01T01:27:03.008Z"); return t}()), // PrivateLinkServiceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateLinkServices/console-pls"), // ProvisioningState: to.Ptr(armnetworkcloud.ConsoleProvisioningStateSucceeded), // SSHPublicKey: &armnetworkcloud.SSHPublicKey{ // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }, // VirtualMachineAccessID: to.Ptr("VirtualMachineAccessId"), // }, // }}, // } } }
Output:
type ConsolesClientBeginCreateOrUpdateOptions ¶
type ConsolesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConsolesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConsolesClient.BeginCreateOrUpdate method.
type ConsolesClientBeginDeleteOptions ¶
type ConsolesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConsolesClientBeginDeleteOptions contains the optional parameters for the ConsolesClient.BeginDelete method.
type ConsolesClientBeginUpdateOptions ¶
type ConsolesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConsolesClientBeginUpdateOptions contains the optional parameters for the ConsolesClient.BeginUpdate method.
type ConsolesClientCreateOrUpdateResponse ¶
type ConsolesClientCreateOrUpdateResponse struct { // Console represents the console of an on-premises Network Cloud virtual machine. Console }
ConsolesClientCreateOrUpdateResponse contains the response from method ConsolesClient.BeginCreateOrUpdate.
type ConsolesClientDeleteResponse ¶
type ConsolesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
ConsolesClientDeleteResponse contains the response from method ConsolesClient.BeginDelete.
type ConsolesClientGetOptions ¶
type ConsolesClientGetOptions struct { }
ConsolesClientGetOptions contains the optional parameters for the ConsolesClient.Get method.
type ConsolesClientGetResponse ¶
type ConsolesClientGetResponse struct { // Console represents the console of an on-premises Network Cloud virtual machine. Console }
ConsolesClientGetResponse contains the response from method ConsolesClient.Get.
type ConsolesClientListByVirtualMachineOptions ¶ added in v0.2.0
type ConsolesClientListByVirtualMachineOptions struct { }
ConsolesClientListByVirtualMachineOptions contains the optional parameters for the ConsolesClient.NewListByVirtualMachinePager method.
type ConsolesClientListByVirtualMachineResponse ¶ added in v0.2.0
type ConsolesClientListByVirtualMachineResponse struct { // ConsoleList represents a list of virtual machine consoles. ConsoleList }
ConsolesClientListByVirtualMachineResponse contains the response from method ConsolesClient.NewListByVirtualMachinePager.
type ConsolesClientUpdateResponse ¶
type ConsolesClientUpdateResponse struct { // Console represents the console of an on-premises Network Cloud virtual machine. Console }
ConsolesClientUpdateResponse contains the response from method ConsolesClient.BeginUpdate.
type ControlImpact ¶
type ControlImpact string
ControlImpact - The indicator of whether the control plane will be impacted during the upgrade.
const ( ControlImpactFalse ControlImpact = "False" ControlImpactTrue ControlImpact = "True" )
func PossibleControlImpactValues ¶
func PossibleControlImpactValues() []ControlImpact
PossibleControlImpactValues returns the possible values for the ControlImpact const type.
type ControlPlaneNodeConfiguration ¶ added in v0.2.0
type ControlPlaneNodeConfiguration struct { // REQUIRED; The number of virtual machines that use this configuration. Count *int64 // REQUIRED; The name of the VM SKU supplied during creation. VMSKUName *string // The administrator credentials to be used for the nodes in the control plane. AdministratorConfiguration *AdministratorConfiguration // The list of availability zones of the Network Cloud cluster to be used for the provisioning of nodes in the control plane. // If not specified, all availability zones will be used. AvailabilityZones []*string }
ControlPlaneNodeConfiguration represents the selection of virtual machines and size of the control plane for a Kubernetes cluster.
func (ControlPlaneNodeConfiguration) MarshalJSON ¶ added in v0.2.0
func (c ControlPlaneNodeConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ControlPlaneNodeConfiguration.
func (*ControlPlaneNodeConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (c *ControlPlaneNodeConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ControlPlaneNodeConfiguration.
type ControlPlaneNodePatchConfiguration ¶ added in v0.2.0
type ControlPlaneNodePatchConfiguration struct { // The configuration of administrator credentials for the control plane nodes. AdministratorConfiguration *AdministratorConfigurationPatch // The number of virtual machines that use this configuration. Count *int64 }
ControlPlaneNodePatchConfiguration represents the properties of the control plane that can be patched for this Kubernetes cluster.
func (ControlPlaneNodePatchConfiguration) MarshalJSON ¶ added in v0.2.0
func (c ControlPlaneNodePatchConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ControlPlaneNodePatchConfiguration.
func (*ControlPlaneNodePatchConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (c *ControlPlaneNodePatchConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ControlPlaneNodePatchConfiguration.
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 DefaultGateway ¶
type DefaultGateway string
DefaultGateway - The indicator of whether this is the default gateway. Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
const ( DefaultGatewayFalse DefaultGateway = "False" DefaultGatewayTrue DefaultGateway = "True" )
func PossibleDefaultGatewayValues ¶
func PossibleDefaultGatewayValues() []DefaultGateway
PossibleDefaultGatewayValues returns the possible values for the DefaultGateway const type.
type DeviceConnectionType ¶
type DeviceConnectionType string
DeviceConnectionType - The connection type of the device.
const (
DeviceConnectionTypePCI DeviceConnectionType = "PCI"
)
func PossibleDeviceConnectionTypeValues ¶
func PossibleDeviceConnectionTypeValues() []DeviceConnectionType
PossibleDeviceConnectionTypeValues returns the possible values for the DeviceConnectionType const type.
type DiskType ¶
type DiskType string
DiskType - The disk type of rack SKU resource.
func PossibleDiskTypeValues ¶
func PossibleDiskTypeValues() []DiskType
PossibleDiskTypeValues returns the possible values for the DiskType const type.
type EgressEndpoint ¶
type EgressEndpoint struct { // REQUIRED; The descriptive category name of endpoints accessible by the AKS agent node. For example, azure-resource-management, // API server, etc. The platform egress endpoints provided by default will use the // category 'default'. Category *string // REQUIRED; The list of endpoint dependencies. Endpoints []*EndpointDependency }
EgressEndpoint represents the connection from a cloud services network to the specified endpoint for a common purpose.
func (EgressEndpoint) MarshalJSON ¶
func (e EgressEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EgressEndpoint.
func (*EgressEndpoint) UnmarshalJSON ¶
func (e *EgressEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EgressEndpoint.
type EndpointDependency ¶
type EndpointDependency struct { // REQUIRED; The domain name of the dependency. DomainName *string // The port of this endpoint. Port *int64 }
EndpointDependency represents the definition of an endpoint, including the domain and details.
func (EndpointDependency) MarshalJSON ¶
func (e EndpointDependency) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointDependency.
func (*EndpointDependency) UnmarshalJSON ¶
func (e *EndpointDependency) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency.
type ErrorAdditionalInfo ¶ added in v1.0.0
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v1.0.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v1.0.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶ added in v1.0.0
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶ added in v1.0.0
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶ added in v1.0.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ExtendedLocation ¶
type ExtendedLocation struct { // REQUIRED; The resource ID of the extended location on which the resource will be created. Name *string // REQUIRED; The extended location type, for example, CustomLocation. Type *string }
ExtendedLocation represents the Azure custom location where the resource will be created.
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 FabricPeeringEnabled ¶ added in v0.2.0
type FabricPeeringEnabled string
FabricPeeringEnabled - The indicator to specify if the load balancer peers with the network fabric.
const ( FabricPeeringEnabledFalse FabricPeeringEnabled = "False" FabricPeeringEnabledTrue FabricPeeringEnabled = "True" )
func PossibleFabricPeeringEnabledValues ¶ added in v0.2.0
func PossibleFabricPeeringEnabledValues() []FabricPeeringEnabled
PossibleFabricPeeringEnabledValues returns the possible values for the FabricPeeringEnabled const type.
type FeatureDetailedStatus ¶ added in v0.2.0
type FeatureDetailedStatus string
FeatureDetailedStatus - The status representing the state of this feature.
const ( FeatureDetailedStatusFailed FeatureDetailedStatus = "Failed" FeatureDetailedStatusRunning FeatureDetailedStatus = "Running" FeatureDetailedStatusUnknown FeatureDetailedStatus = "Unknown" )
func PossibleFeatureDetailedStatusValues ¶ added in v0.2.0
func PossibleFeatureDetailedStatusValues() []FeatureDetailedStatus
PossibleFeatureDetailedStatusValues returns the possible values for the FeatureDetailedStatus const type.
type FeatureStatus ¶ added in v0.2.0
type FeatureStatus struct { // READ-ONLY; The status representing the state of this feature. DetailedStatus *FeatureDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The name of the feature. Name *string // READ-ONLY; The version of the feature. Version *string }
FeatureStatus contains information regarding a Kubernetes cluster feature.
func (FeatureStatus) MarshalJSON ¶ added in v0.2.0
func (f FeatureStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FeatureStatus.
func (*FeatureStatus) UnmarshalJSON ¶ added in v0.2.0
func (f *FeatureStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FeatureStatus.
type HardwareInventory ¶
type HardwareInventory struct { // READ-ONLY; Freeform data extracted from the environment about this machine. This information varies depending on the specific // hardware and configuration. AdditionalHostInformation *string // READ-ONLY; The list of network interfaces and associated details for the bare metal machine. Interfaces []*HardwareInventoryNetworkInterface // READ-ONLY; Field Deprecated. Will be removed in an upcoming version. The list of network interface cards and associated // details for the bare metal machine. Nics []*Nic }
HardwareInventory represents the hardware configuration of this machine as exposed to the customer, including information acquired from the model/sku information and from the ironic inspector.
func (HardwareInventory) MarshalJSON ¶
func (h HardwareInventory) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareInventory.
func (*HardwareInventory) UnmarshalJSON ¶
func (h *HardwareInventory) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareInventory.
type HardwareInventoryNetworkInterface ¶
type HardwareInventoryNetworkInterface struct { // READ-ONLY; The current status of the link. LinkStatus *string // READ-ONLY; The MAC address associated with this interface. MacAddress *string // READ-ONLY; The name of the interface. Name *string // READ-ONLY; The resource ID of the network interface for the port on the switch that this machine's interface is connected // to. NetworkInterfaceID *string }
HardwareInventoryNetworkInterface represents the network interface details as part of a hardware inventory.
func (HardwareInventoryNetworkInterface) MarshalJSON ¶
func (h HardwareInventoryNetworkInterface) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareInventoryNetworkInterface.
func (*HardwareInventoryNetworkInterface) UnmarshalJSON ¶
func (h *HardwareInventoryNetworkInterface) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareInventoryNetworkInterface.
type HardwareValidationStatus ¶
type HardwareValidationStatus struct { // READ-ONLY; The timestamp of the hardware validation execution. LastValidationTime *time.Time // READ-ONLY; The outcome of the hardware validation. Result *BareMetalMachineHardwareValidationResult }
HardwareValidationStatus represents the latest hardware validation details performed for this bare metal machine.
func (HardwareValidationStatus) MarshalJSON ¶
func (h HardwareValidationStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareValidationStatus.
func (*HardwareValidationStatus) UnmarshalJSON ¶
func (h *HardwareValidationStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareValidationStatus.
type HugepagesSize ¶ added in v0.2.0
type HugepagesSize string
HugepagesSize - The size of the hugepages to allocate.
const ( HugepagesSizeOneG HugepagesSize = "1G" HugepagesSizeTwoM HugepagesSize = "2M" )
func PossibleHugepagesSizeValues ¶ added in v0.2.0
func PossibleHugepagesSizeValues() []HugepagesSize
PossibleHugepagesSizeValues returns the possible values for the HugepagesSize const type.
type HybridAksIpamEnabled ¶
type HybridAksIpamEnabled string
HybridAksIpamEnabled - Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster.
const ( HybridAksIpamEnabledFalse HybridAksIpamEnabled = "False" HybridAksIpamEnabledTrue HybridAksIpamEnabled = "True" )
func PossibleHybridAksIpamEnabledValues ¶
func PossibleHybridAksIpamEnabledValues() []HybridAksIpamEnabled
PossibleHybridAksIpamEnabledValues returns the possible values for the HybridAksIpamEnabled const type.
type HybridAksPluginType ¶
type HybridAksPluginType string
HybridAksPluginType - Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS.
const ( HybridAksPluginTypeDPDK HybridAksPluginType = "DPDK" HybridAksPluginTypeOSDevice HybridAksPluginType = "OSDevice" HybridAksPluginTypeSRIOV HybridAksPluginType = "SRIOV" )
func PossibleHybridAksPluginTypeValues ¶
func PossibleHybridAksPluginTypeValues() []HybridAksPluginType
PossibleHybridAksPluginTypeValues returns the possible values for the HybridAksPluginType const type.
type IPAddressPool ¶ added in v0.2.0
type IPAddressPool struct { // REQUIRED; The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range // of IP addresses. For a BGP service load balancer configuration, only CIDR format is // supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. Addresses []*string // REQUIRED; The name used to identify this IP address pool for association with a BGP advertisement. Name *string // The indicator to determine if automatic allocation from the pool should occur. AutoAssign *BfdEnabled // The indicator to prevent the use of IP addresses ending with .0 and .255 for this pool. Enabling this option will only // use IP addresses between .1 and .254 inclusive. OnlyUseHostIPs *BfdEnabled }
IPAddressPool - IpAddressPool represents a pool of IP addresses that can be allocated to a service.
func (IPAddressPool) MarshalJSON ¶ added in v0.2.0
func (i IPAddressPool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPAddressPool.
func (*IPAddressPool) UnmarshalJSON ¶ added in v0.2.0
func (i *IPAddressPool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressPool.
type IPAllocationType ¶
type IPAllocationType string
IPAllocationType - The type of the IP address allocation, defaulted to "DualStack".
const ( IPAllocationTypeDualStack IPAllocationType = "DualStack" IPAllocationTypeIPV4 IPAllocationType = "IPV4" IPAllocationTypeIPV6 IPAllocationType = "IPV6" )
func PossibleIPAllocationTypeValues ¶
func PossibleIPAllocationTypeValues() []IPAllocationType
PossibleIPAllocationTypeValues returns the possible values for the IPAllocationType const type.
type IdentitySelector ¶ added in v1.2.0
type IdentitySelector struct { // The type of managed identity that is being selected. IdentityType *ManagedServiceIdentitySelectorType // The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. UserAssignedIdentityResourceID *string }
IdentitySelector represents the selection of a managed identity for use.
func (IdentitySelector) MarshalJSON ¶ added in v1.2.0
func (i IdentitySelector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IdentitySelector.
func (*IdentitySelector) UnmarshalJSON ¶ added in v1.2.0
func (i *IdentitySelector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IdentitySelector.
type ImageRepositoryCredentials ¶
type ImageRepositoryCredentials struct { // REQUIRED; The password or token used to access an image in the target repository. Password *string // REQUIRED; The URL of the authentication server used to validate the repository credentials. RegistryURL *string // REQUIRED; The username used to access an image in the target repository. Username *string }
ImageRepositoryCredentials represents the credentials used to login to the image repository.
func (ImageRepositoryCredentials) MarshalJSON ¶
func (i ImageRepositoryCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageRepositoryCredentials.
func (*ImageRepositoryCredentials) UnmarshalJSON ¶
func (i *ImageRepositoryCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageRepositoryCredentials.
type InitialAgentPoolConfiguration ¶ added in v0.2.0
type InitialAgentPoolConfiguration struct { // REQUIRED; The number of virtual machines that use this configuration. Count *int64 // REQUIRED; The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the // features and critical services for the Kubernetes Cluster, while user pools are dedicated // to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. Mode *AgentPoolMode // REQUIRED; The name that will be used for the agent pool resource representing this agent pool. Name *string // REQUIRED; The name of the VM SKU that determines the size of resources allocated for node VMs. VMSKUName *string // The administrator credentials to be used for the nodes in this agent pool. AdministratorConfiguration *AdministratorConfiguration // The configurations that will be applied to each agent in this agent pool. AgentOptions *AgentOptions // The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. AttachedNetworkConfiguration *AttachedNetworkConfiguration // The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not // specified, all availability zones will be used. AvailabilityZones []*string // The labels applied to the nodes in this agent pool. Labels []*KubernetesLabel // The taints applied to the nodes in this agent pool. Taints []*KubernetesLabel // The configuration of the agent pool. UpgradeSettings *AgentPoolUpgradeSettings }
InitialAgentPoolConfiguration specifies the configuration of a pool of virtual machines that are initially defined with a Kubernetes cluster.
func (InitialAgentPoolConfiguration) MarshalJSON ¶ added in v0.2.0
func (i InitialAgentPoolConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InitialAgentPoolConfiguration.
func (*InitialAgentPoolConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (i *InitialAgentPoolConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InitialAgentPoolConfiguration.
type KeySetUser ¶
type KeySetUser struct { // REQUIRED; The user name that will be used for access. AzureUserName *string // REQUIRED; The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH // private key for logging in. SSHPublicKey *SSHPublicKey // The free-form description for this user. Description *string // The user principal name (email format) used to validate this user's group membership. UserPrincipalName *string }
KeySetUser represents the properties of the user in the key set.
func (KeySetUser) MarshalJSON ¶
func (k KeySetUser) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeySetUser.
func (*KeySetUser) UnmarshalJSON ¶
func (k *KeySetUser) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeySetUser.
type KeySetUserStatus ¶
type KeySetUserStatus struct { // READ-ONLY; The user name that will be used for access. AzureUserName *string // READ-ONLY; The indicator of whether the user is currently deployed for access. Status *BareMetalMachineKeySetUserSetupStatus // READ-ONLY; The additional information describing the current status of this user, if any available. StatusMessage *string }
KeySetUserStatus represents the status of the key set user.
func (KeySetUserStatus) MarshalJSON ¶
func (k KeySetUserStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeySetUserStatus.
func (*KeySetUserStatus) UnmarshalJSON ¶
func (k *KeySetUserStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeySetUserStatus.
type KubernetesCluster ¶ added in v0.2.0
type KubernetesCluster struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *KubernetesClusterProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud.
func (KubernetesCluster) MarshalJSON ¶ added in v0.2.0
func (k KubernetesCluster) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesCluster.
func (*KubernetesCluster) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesCluster) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesCluster.
type KubernetesClusterDetailedStatus ¶ added in v0.2.0
type KubernetesClusterDetailedStatus string
KubernetesClusterDetailedStatus - The current status of the Kubernetes cluster.
const ( KubernetesClusterDetailedStatusAvailable KubernetesClusterDetailedStatus = "Available" KubernetesClusterDetailedStatusError KubernetesClusterDetailedStatus = "Error" KubernetesClusterDetailedStatusProvisioning KubernetesClusterDetailedStatus = "Provisioning" )
func PossibleKubernetesClusterDetailedStatusValues ¶ added in v0.2.0
func PossibleKubernetesClusterDetailedStatusValues() []KubernetesClusterDetailedStatus
PossibleKubernetesClusterDetailedStatusValues returns the possible values for the KubernetesClusterDetailedStatus const type.
type KubernetesClusterFeature ¶ added in v1.2.0
type KubernetesClusterFeature struct { // REQUIRED; The geo-location where the resource lives Location *string // The list of the resource properties. Properties *KubernetesClusterFeatureProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
KubernetesClusterFeature represents the feature of a Kubernetes cluster.
func (KubernetesClusterFeature) MarshalJSON ¶ added in v1.2.0
func (k KubernetesClusterFeature) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeature.
func (*KubernetesClusterFeature) UnmarshalJSON ¶ added in v1.2.0
func (k *KubernetesClusterFeature) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeature.
type KubernetesClusterFeatureAvailabilityLifecycle ¶ added in v1.2.0
type KubernetesClusterFeatureAvailabilityLifecycle string
KubernetesClusterFeatureAvailabilityLifecycle - The lifecycle indicator of the feature.
const ( KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable KubernetesClusterFeatureAvailabilityLifecycle = "GenerallyAvailable" KubernetesClusterFeatureAvailabilityLifecyclePreview KubernetesClusterFeatureAvailabilityLifecycle = "Preview" )
func PossibleKubernetesClusterFeatureAvailabilityLifecycleValues ¶ added in v1.2.0
func PossibleKubernetesClusterFeatureAvailabilityLifecycleValues() []KubernetesClusterFeatureAvailabilityLifecycle
PossibleKubernetesClusterFeatureAvailabilityLifecycleValues returns the possible values for the KubernetesClusterFeatureAvailabilityLifecycle const type.
type KubernetesClusterFeatureDetailedStatus ¶ added in v1.2.0
type KubernetesClusterFeatureDetailedStatus string
KubernetesClusterFeatureDetailedStatus - The detailed status of the feature.
const ( KubernetesClusterFeatureDetailedStatusError KubernetesClusterFeatureDetailedStatus = "Error" KubernetesClusterFeatureDetailedStatusInstalled KubernetesClusterFeatureDetailedStatus = "Installed" KubernetesClusterFeatureDetailedStatusProvisioning KubernetesClusterFeatureDetailedStatus = "Provisioning" )
func PossibleKubernetesClusterFeatureDetailedStatusValues ¶ added in v1.2.0
func PossibleKubernetesClusterFeatureDetailedStatusValues() []KubernetesClusterFeatureDetailedStatus
PossibleKubernetesClusterFeatureDetailedStatusValues returns the possible values for the KubernetesClusterFeatureDetailedStatus const type.
type KubernetesClusterFeatureList ¶ added in v1.2.0
type KubernetesClusterFeatureList struct { // The link used to get the next page of operations. NextLink *string // The list of Kubernetes cluster features. Value []*KubernetesClusterFeature }
KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources.
func (KubernetesClusterFeatureList) MarshalJSON ¶ added in v1.2.0
func (k KubernetesClusterFeatureList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeatureList.
func (*KubernetesClusterFeatureList) UnmarshalJSON ¶ added in v1.2.0
func (k *KubernetesClusterFeatureList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeatureList.
type KubernetesClusterFeaturePatchParameters ¶ added in v1.2.0
type KubernetesClusterFeaturePatchParameters struct { // The list of the resource properties. Properties *KubernetesClusterFeaturePatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
KubernetesClusterFeaturePatchParameters represents the body of the request to patch the Kubernetes cluster feature.
func (KubernetesClusterFeaturePatchParameters) MarshalJSON ¶ added in v1.2.0
func (k KubernetesClusterFeaturePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeaturePatchParameters.
func (*KubernetesClusterFeaturePatchParameters) UnmarshalJSON ¶ added in v1.2.0
func (k *KubernetesClusterFeaturePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeaturePatchParameters.
type KubernetesClusterFeaturePatchProperties ¶ added in v1.2.0
type KubernetesClusterFeaturePatchProperties struct { // The configured options for the feature. Options []*StringKeyValuePair }
KubernetesClusterFeaturePatchProperties represents the Kubernetes cluster feature properties for patching.
func (KubernetesClusterFeaturePatchProperties) MarshalJSON ¶ added in v1.2.0
func (k KubernetesClusterFeaturePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeaturePatchProperties.
func (*KubernetesClusterFeaturePatchProperties) UnmarshalJSON ¶ added in v1.2.0
func (k *KubernetesClusterFeaturePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeaturePatchProperties.
type KubernetesClusterFeatureProperties ¶ added in v1.2.0
type KubernetesClusterFeatureProperties struct { // The configured options for the feature. Options []*StringKeyValuePair // READ-ONLY; The lifecycle indicator of the feature. AvailabilityLifecycle *KubernetesClusterFeatureAvailabilityLifecycle // READ-ONLY; The detailed status of the feature. DetailedStatus *KubernetesClusterFeatureDetailedStatus // READ-ONLY; The descriptive message for the detailed status of the feature. DetailedStatusMessage *string // READ-ONLY; The provisioning state of the Kubernetes cluster feature. ProvisioningState *KubernetesClusterFeatureProvisioningState // READ-ONLY; The indicator of if the feature is required or optional. Optional features may be deleted by the user, while // required features are managed with the kubernetes cluster lifecycle. Required *KubernetesClusterFeatureRequired // READ-ONLY; The version of the feature. Version *string }
KubernetesClusterFeatureProperties represents the properties of a Kubernetes cluster feature.
func (KubernetesClusterFeatureProperties) MarshalJSON ¶ added in v1.2.0
func (k KubernetesClusterFeatureProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterFeatureProperties.
func (*KubernetesClusterFeatureProperties) UnmarshalJSON ¶ added in v1.2.0
func (k *KubernetesClusterFeatureProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterFeatureProperties.
type KubernetesClusterFeatureProvisioningState ¶ added in v1.2.0
type KubernetesClusterFeatureProvisioningState string
KubernetesClusterFeatureProvisioningState - The provisioning state of the Kubernetes cluster feature.
const ( KubernetesClusterFeatureProvisioningStateAccepted KubernetesClusterFeatureProvisioningState = "Accepted" KubernetesClusterFeatureProvisioningStateCanceled KubernetesClusterFeatureProvisioningState = "Canceled" KubernetesClusterFeatureProvisioningStateDeleting KubernetesClusterFeatureProvisioningState = "Deleting" KubernetesClusterFeatureProvisioningStateFailed KubernetesClusterFeatureProvisioningState = "Failed" KubernetesClusterFeatureProvisioningStateSucceeded KubernetesClusterFeatureProvisioningState = "Succeeded" KubernetesClusterFeatureProvisioningStateUpdating KubernetesClusterFeatureProvisioningState = "Updating" )
func PossibleKubernetesClusterFeatureProvisioningStateValues ¶ added in v1.2.0
func PossibleKubernetesClusterFeatureProvisioningStateValues() []KubernetesClusterFeatureProvisioningState
PossibleKubernetesClusterFeatureProvisioningStateValues returns the possible values for the KubernetesClusterFeatureProvisioningState const type.
type KubernetesClusterFeatureRequired ¶ added in v1.2.0
type KubernetesClusterFeatureRequired string
KubernetesClusterFeatureRequired - The indicator of if the feature is required or optional. Optional features may be deleted by the user, while required features are managed with the kubernetes cluster lifecycle.
const ( KubernetesClusterFeatureRequiredFalse KubernetesClusterFeatureRequired = "False" KubernetesClusterFeatureRequiredTrue KubernetesClusterFeatureRequired = "True" )
func PossibleKubernetesClusterFeatureRequiredValues ¶ added in v1.2.0
func PossibleKubernetesClusterFeatureRequiredValues() []KubernetesClusterFeatureRequired
PossibleKubernetesClusterFeatureRequiredValues returns the possible values for the KubernetesClusterFeatureRequired const type.
type KubernetesClusterFeaturesClient ¶ added in v1.2.0
type KubernetesClusterFeaturesClient struct {
// contains filtered or unexported fields
}
KubernetesClusterFeaturesClient contains the methods for the KubernetesClusterFeatures group. Don't use this type directly, use NewKubernetesClusterFeaturesClient() instead.
func NewKubernetesClusterFeaturesClient ¶ added in v1.2.0
func NewKubernetesClusterFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KubernetesClusterFeaturesClient, error)
NewKubernetesClusterFeaturesClient creates a new instance of KubernetesClusterFeaturesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*KubernetesClusterFeaturesClient) BeginCreateOrUpdate ¶ added in v1.2.0
func (client *KubernetesClusterFeaturesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureParameters KubernetesClusterFeature, options *KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions) (*runtime.Poller[KubernetesClusterFeaturesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- featureName - The name of the feature.
- kubernetesClusterFeatureParameters - The request body.
- options - KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusterFeatures_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClusterFeaturesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", armnetworkcloud.KubernetesClusterFeature{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ Options: []*armnetworkcloud.StringKeyValuePair{ { Key: to.Ptr("featureOptionName"), Value: to.Ptr("featureOptionValue"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesClusterFeature = armnetworkcloud.KubernetesClusterFeature{ // Name: to.Ptr("featureName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), // Options: []*armnetworkcloud.StringKeyValuePair{ // { // Key: to.Ptr("featureOptionName"), // Value: to.Ptr("featureOptionValue"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), // Version: to.Ptr("1.2.3"), // }, // } }
Output:
func (*KubernetesClusterFeaturesClient) BeginDelete ¶ added in v1.2.0
func (client *KubernetesClusterFeaturesClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientBeginDeleteOptions) (*runtime.Poller[KubernetesClusterFeaturesClientDeleteResponse], error)
BeginDelete - Delete the provided Kubernetes cluster feature. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- featureName - The name of the feature.
- options - KubernetesClusterFeaturesClientBeginDeleteOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusterFeatures_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClusterFeaturesClient().BeginDelete(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", 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 (*KubernetesClusterFeaturesClient) BeginUpdate ¶ added in v1.2.0
func (client *KubernetesClusterFeaturesClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, kubernetesClusterFeatureUpdateParameters KubernetesClusterFeaturePatchParameters, options *KubernetesClusterFeaturesClientBeginUpdateOptions) (*runtime.Poller[KubernetesClusterFeaturesClientUpdateResponse], error)
BeginUpdate - Patch properties of the provided Kubernetes cluster feature. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- featureName - The name of the feature.
- kubernetesClusterFeatureUpdateParameters - The request body.
- options - KubernetesClusterFeaturesClientBeginUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusterFeatures_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClusterFeaturesClient().BeginUpdate(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", armnetworkcloud.KubernetesClusterFeaturePatchParameters{ Properties: &armnetworkcloud.KubernetesClusterFeaturePatchProperties{ Options: []*armnetworkcloud.StringKeyValuePair{ { Key: to.Ptr("featureOptionName"), Value: to.Ptr("featureOptionValue"), }}, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesClusterFeature = armnetworkcloud.KubernetesClusterFeature{ // Name: to.Ptr("featureName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), // Options: []*armnetworkcloud.StringKeyValuePair{ // { // Key: to.Ptr("featureOptionName"), // Value: to.Ptr("featureOptionValue"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), // Version: to.Ptr("1.2.3"), // }, // } }
Output:
func (*KubernetesClusterFeaturesClient) Get ¶ added in v1.2.0
func (client *KubernetesClusterFeaturesClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, featureName string, options *KubernetesClusterFeaturesClientGetOptions) (KubernetesClusterFeaturesClientGetResponse, error)
Get - Get properties of the provided the Kubernetes cluster feature. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- featureName - The name of the feature.
- options - KubernetesClusterFeaturesClientGetOptions contains the optional parameters for the KubernetesClusterFeaturesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusterFeatures_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewKubernetesClusterFeaturesClient().Get(ctx, "resourceGroupName", "kubernetesClusterName", "featureName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesClusterFeature = armnetworkcloud.KubernetesClusterFeature{ // Name: to.Ptr("featureName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), // Options: []*armnetworkcloud.StringKeyValuePair{ // { // Key: to.Ptr("featureOptionName"), // Value: to.Ptr("featureOptionValue"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), // Version: to.Ptr("1.2.3"), // }, // } }
Output:
func (*KubernetesClusterFeaturesClient) NewListByKubernetesClusterPager ¶ added in v1.2.0
func (client *KubernetesClusterFeaturesClient) NewListByKubernetesClusterPager(resourceGroupName string, kubernetesClusterName string, options *KubernetesClusterFeaturesClientListByKubernetesClusterOptions) *runtime.Pager[KubernetesClusterFeaturesClientListByKubernetesClusterResponse]
NewListByKubernetesClusterPager - Get a list of features for the provided Kubernetes cluster.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- options - KubernetesClusterFeaturesClientListByKubernetesClusterOptions contains the optional parameters for the KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewKubernetesClusterFeaturesClient().NewListByKubernetesClusterPager("resourceGroupName", "kubernetesClusterName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.KubernetesClusterFeatureList = armnetworkcloud.KubernetesClusterFeatureList{ // Value: []*armnetworkcloud.KubernetesClusterFeature{ // { // Name: to.Ptr("featureName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters/features"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/features/featureName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // Properties: &armnetworkcloud.KubernetesClusterFeatureProperties{ // AvailabilityLifecycle: to.Ptr(armnetworkcloud.KubernetesClusterFeatureAvailabilityLifecycleGenerallyAvailable), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterFeatureDetailedStatusInstalled), // DetailedStatusMessage: to.Ptr("The feature is successfully installed."), // Options: []*armnetworkcloud.StringKeyValuePair{ // { // Key: to.Ptr("featureOptionName"), // Value: to.Ptr("featureOptionValue"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterFeatureProvisioningStateSucceeded), // Required: to.Ptr(armnetworkcloud.KubernetesClusterFeatureRequiredTrue), // Version: to.Ptr("1.2.3"), // }, // }}, // } } }
Output:
type KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions ¶ added in v1.2.0
type KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClusterFeaturesClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginCreateOrUpdate method.
type KubernetesClusterFeaturesClientBeginDeleteOptions ¶ added in v1.2.0
type KubernetesClusterFeaturesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClusterFeaturesClientBeginDeleteOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginDelete method.
type KubernetesClusterFeaturesClientBeginUpdateOptions ¶ added in v1.2.0
type KubernetesClusterFeaturesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClusterFeaturesClientBeginUpdateOptions contains the optional parameters for the KubernetesClusterFeaturesClient.BeginUpdate method.
type KubernetesClusterFeaturesClientCreateOrUpdateResponse ¶ added in v1.2.0
type KubernetesClusterFeaturesClientCreateOrUpdateResponse struct { // KubernetesClusterFeature represents the feature of a Kubernetes cluster. KubernetesClusterFeature }
KubernetesClusterFeaturesClientCreateOrUpdateResponse contains the response from method KubernetesClusterFeaturesClient.BeginCreateOrUpdate.
type KubernetesClusterFeaturesClientDeleteResponse ¶ added in v1.2.0
type KubernetesClusterFeaturesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
KubernetesClusterFeaturesClientDeleteResponse contains the response from method KubernetesClusterFeaturesClient.BeginDelete.
type KubernetesClusterFeaturesClientGetOptions ¶ added in v1.2.0
type KubernetesClusterFeaturesClientGetOptions struct { }
KubernetesClusterFeaturesClientGetOptions contains the optional parameters for the KubernetesClusterFeaturesClient.Get method.
type KubernetesClusterFeaturesClientGetResponse ¶ added in v1.2.0
type KubernetesClusterFeaturesClientGetResponse struct { // KubernetesClusterFeature represents the feature of a Kubernetes cluster. KubernetesClusterFeature }
KubernetesClusterFeaturesClientGetResponse contains the response from method KubernetesClusterFeaturesClient.Get.
type KubernetesClusterFeaturesClientListByKubernetesClusterOptions ¶ added in v1.2.0
type KubernetesClusterFeaturesClientListByKubernetesClusterOptions struct { }
KubernetesClusterFeaturesClientListByKubernetesClusterOptions contains the optional parameters for the KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager method.
type KubernetesClusterFeaturesClientListByKubernetesClusterResponse ¶ added in v1.2.0
type KubernetesClusterFeaturesClientListByKubernetesClusterResponse struct { // KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. KubernetesClusterFeatureList }
KubernetesClusterFeaturesClientListByKubernetesClusterResponse contains the response from method KubernetesClusterFeaturesClient.NewListByKubernetesClusterPager.
type KubernetesClusterFeaturesClientUpdateResponse ¶ added in v1.2.0
type KubernetesClusterFeaturesClientUpdateResponse struct { // KubernetesClusterFeature represents the feature of a Kubernetes cluster. KubernetesClusterFeature }
KubernetesClusterFeaturesClientUpdateResponse contains the response from method KubernetesClusterFeaturesClient.BeginUpdate.
type KubernetesClusterList ¶ added in v0.2.0
type KubernetesClusterList struct { // The link used to get the next page of operations. NextLink *string // The list of additional details related to Kubernetes clusters. Value []*KubernetesCluster }
KubernetesClusterList represents a list of Kubernetes clusters.
func (KubernetesClusterList) MarshalJSON ¶ added in v0.2.0
func (k KubernetesClusterList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterList.
func (*KubernetesClusterList) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesClusterList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterList.
type KubernetesClusterNode ¶ added in v0.2.0
type KubernetesClusterNode struct { // READ-ONLY; The resource ID of the agent pool that this node belongs to. This value is not represented on control plane // nodes. AgentPoolID *string // READ-ONLY; The availability zone this node is running within. AvailabilityZone *string // READ-ONLY; The resource ID of the bare metal machine that hosts this node. BareMetalMachineID *string // READ-ONLY; The number of CPU cores configured for this node, derived from the VM SKU specified. CPUCores *int64 // READ-ONLY; The detailed state of this node. DetailedStatus *KubernetesClusterNodeDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The size of the disk configured for this node. Allocations are measured in gibibytes. DiskSizeGB *int64 // READ-ONLY; The machine image used to deploy this node. Image *string // READ-ONLY; The currently running version of Kubernetes and bundled features running on this node. KubernetesVersion *string // READ-ONLY; The list of labels on this node that have been assigned to the agent pool containing this node. Labels []*KubernetesLabel // READ-ONLY; The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in // gibibytes. MemorySizeGB *int64 // READ-ONLY; The mode of the agent pool containing this node. Not applicable for control plane nodes. Mode *AgentPoolMode // READ-ONLY; The name of this node, as realized in the Kubernetes cluster. Name *string // READ-ONLY; The NetworkAttachments made to this node. NetworkAttachments []*NetworkAttachment // READ-ONLY; The power state of this node. PowerState *KubernetesNodePowerState // READ-ONLY; The role of this node in the cluster. Role *KubernetesNodeRole // READ-ONLY; The list of taints that have been assigned to the agent pool containing this node. Taints []*KubernetesLabel // READ-ONLY; The VM SKU name that was used to create this cluster node. VMSKUName *string }
KubernetesClusterNode represents the details of a node in a Kubernetes cluster.
func (KubernetesClusterNode) MarshalJSON ¶ added in v0.2.0
func (k KubernetesClusterNode) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterNode.
func (*KubernetesClusterNode) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesClusterNode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterNode.
type KubernetesClusterNodeDetailedStatus ¶ added in v0.2.0
type KubernetesClusterNodeDetailedStatus string
KubernetesClusterNodeDetailedStatus - The detailed state of this node.
const ( KubernetesClusterNodeDetailedStatusAvailable KubernetesClusterNodeDetailedStatus = "Available" KubernetesClusterNodeDetailedStatusError KubernetesClusterNodeDetailedStatus = "Error" KubernetesClusterNodeDetailedStatusProvisioning KubernetesClusterNodeDetailedStatus = "Provisioning" KubernetesClusterNodeDetailedStatusRunning KubernetesClusterNodeDetailedStatus = "Running" KubernetesClusterNodeDetailedStatusScheduling KubernetesClusterNodeDetailedStatus = "Scheduling" KubernetesClusterNodeDetailedStatusStopped KubernetesClusterNodeDetailedStatus = "Stopped" KubernetesClusterNodeDetailedStatusTerminating KubernetesClusterNodeDetailedStatus = "Terminating" KubernetesClusterNodeDetailedStatusUnknown KubernetesClusterNodeDetailedStatus = "Unknown" )
func PossibleKubernetesClusterNodeDetailedStatusValues ¶ added in v0.2.0
func PossibleKubernetesClusterNodeDetailedStatusValues() []KubernetesClusterNodeDetailedStatus
PossibleKubernetesClusterNodeDetailedStatusValues returns the possible values for the KubernetesClusterNodeDetailedStatus const type.
type KubernetesClusterPatchParameters ¶ added in v0.2.0
type KubernetesClusterPatchParameters struct { // The list of the resource properties. Properties *KubernetesClusterPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
KubernetesClusterPatchParameters represents the body of the request to patch the Hybrid AKS cluster.
func (KubernetesClusterPatchParameters) MarshalJSON ¶ added in v0.2.0
func (k KubernetesClusterPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterPatchParameters.
func (*KubernetesClusterPatchParameters) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesClusterPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterPatchParameters.
type KubernetesClusterPatchProperties ¶ added in v0.2.0
type KubernetesClusterPatchProperties struct { // The configuration of the default administrator credentials. AdministratorConfiguration *AdministratorConfigurationPatch // The defining characteristics of the control plane that can be patched for this Kubernetes cluster. ControlPlaneNodeConfiguration *ControlPlaneNodePatchConfiguration // The Kubernetes version for this cluster. KubernetesVersion *string }
KubernetesClusterPatchProperties represents the properties of the Kubernetes cluster that can be patched.
func (KubernetesClusterPatchProperties) MarshalJSON ¶ added in v0.2.0
func (k KubernetesClusterPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterPatchProperties.
func (*KubernetesClusterPatchProperties) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesClusterPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterPatchProperties.
type KubernetesClusterProperties ¶ added in v0.2.0
type KubernetesClusterProperties struct { // REQUIRED; The defining characteristics of the control plane for this Kubernetes Cluster. ControlPlaneNodeConfiguration *ControlPlaneNodeConfiguration // REQUIRED; The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. // This data in this field is only used during creation, and the field will be empty // following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools // sub-resource. InitialAgentPoolConfigurations []*InitialAgentPoolConfiguration // REQUIRED; The Kubernetes version for this cluster. KubernetesVersion *string // REQUIRED; The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. NetworkConfiguration *NetworkConfiguration // The Azure Active Directory Integration properties. AADConfiguration *AADConfiguration // The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their // own values. AdministratorConfiguration *AdministratorConfiguration // The configuration of the managed resource group associated with the resource. ManagedResourceGroupConfiguration *ManagedResourceGroupConfiguration // READ-ONLY; The full list of network resource IDs that are attached to this cluster, including those attached only to specific // agent pools. AttachedNetworkIDs []*string // READ-ONLY; The list of versions that this Kubernetes cluster can be upgraded to. AvailableUpgrades []*AvailableUpgrade // READ-ONLY; The resource ID of the Network Cloud cluster. ClusterID *string // READ-ONLY; The resource ID of the connected cluster set up when this Kubernetes cluster is created. ConnectedClusterID *string // READ-ONLY; The current running version of Kubernetes on the control plane. ControlPlaneKubernetesVersion *string // READ-ONLY; The current status of the Kubernetes cluster. DetailedStatus *KubernetesClusterDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The current feature settings. FeatureStatuses []*FeatureStatus // READ-ONLY; The details of the nodes in this cluster. Nodes []*KubernetesClusterNode // READ-ONLY; The provisioning state of the Kubernetes cluster resource. ProvisioningState *KubernetesClusterProvisioningState }
KubernetesClusterProperties represents the properties of Kubernetes cluster resource.
func (KubernetesClusterProperties) MarshalJSON ¶ added in v0.2.0
func (k KubernetesClusterProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterProperties.
func (*KubernetesClusterProperties) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesClusterProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterProperties.
type KubernetesClusterProvisioningState ¶ added in v0.2.0
type KubernetesClusterProvisioningState string
KubernetesClusterProvisioningState - The provisioning state of the Kubernetes cluster resource.
const ( KubernetesClusterProvisioningStateAccepted KubernetesClusterProvisioningState = "Accepted" KubernetesClusterProvisioningStateCanceled KubernetesClusterProvisioningState = "Canceled" KubernetesClusterProvisioningStateCreated KubernetesClusterProvisioningState = "Created" KubernetesClusterProvisioningStateDeleting KubernetesClusterProvisioningState = "Deleting" KubernetesClusterProvisioningStateFailed KubernetesClusterProvisioningState = "Failed" KubernetesClusterProvisioningStateInProgress KubernetesClusterProvisioningState = "InProgress" KubernetesClusterProvisioningStateSucceeded KubernetesClusterProvisioningState = "Succeeded" KubernetesClusterProvisioningStateUpdating KubernetesClusterProvisioningState = "Updating" )
func PossibleKubernetesClusterProvisioningStateValues ¶ added in v0.2.0
func PossibleKubernetesClusterProvisioningStateValues() []KubernetesClusterProvisioningState
PossibleKubernetesClusterProvisioningStateValues returns the possible values for the KubernetesClusterProvisioningState const type.
type KubernetesClusterRestartNodeParameters ¶ added in v0.2.0
type KubernetesClusterRestartNodeParameters struct { // REQUIRED; The name of the node to restart. NodeName *string }
KubernetesClusterRestartNodeParameters represents the body of the request to restart the node of a Kubernetes cluster.
func (KubernetesClusterRestartNodeParameters) MarshalJSON ¶ added in v0.2.0
func (k KubernetesClusterRestartNodeParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesClusterRestartNodeParameters.
func (*KubernetesClusterRestartNodeParameters) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesClusterRestartNodeParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterRestartNodeParameters.
type KubernetesClustersClient ¶ added in v0.2.0
type KubernetesClustersClient struct {
// contains filtered or unexported fields
}
KubernetesClustersClient contains the methods for the KubernetesClusters group. Don't use this type directly, use NewKubernetesClustersClient() instead.
func NewKubernetesClustersClient ¶ added in v0.2.0
func NewKubernetesClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KubernetesClustersClient, error)
NewKubernetesClustersClient creates a new instance of KubernetesClustersClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*KubernetesClustersClient) BeginCreateOrUpdate ¶ added in v0.2.0
func (client *KubernetesClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterParameters KubernetesCluster, options *KubernetesClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[KubernetesClustersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new Kubernetes cluster or update the properties of the existing one. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- kubernetesClusterParameters - The request body.
- options - KubernetesClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClustersClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateKubernetesCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClustersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "kubernetesClusterName", armnetworkcloud.KubernetesCluster{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.KubernetesClusterProperties{ AADConfiguration: &armnetworkcloud.AADConfiguration{ AdminGroupObjectIDs: []*string{ to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, }, AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, AvailabilityZones: []*string{ to.Ptr("1"), to.Ptr("2"), to.Ptr("3")}, Count: to.Ptr[int64](3), VMSKUName: to.Ptr("NC_G6_28_v1"), }, InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ { Name: to.Ptr("SystemPool-1"), AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, AgentOptions: &armnetworkcloud.AgentOptions{ HugepagesCount: to.Ptr[int64](96), HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), }, AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), }}, L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ { IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), }}, TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), }}, }, AvailabilityZones: []*string{ to.Ptr("1"), to.Ptr("2"), to.Ptr("3")}, Count: to.Ptr[int64](3), Labels: []*armnetworkcloud.KubernetesLabel{ { Key: to.Ptr("kubernetes.label"), Value: to.Ptr("true"), }}, Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), Taints: []*armnetworkcloud.KubernetesLabel{ { Key: to.Ptr("kubernetes.taint"), Value: to.Ptr("true:NoSchedule"), }}, UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ MaxSurge: to.Ptr("1"), }, VMSKUName: to.Ptr("NC_P46_224_v1"), }}, KubernetesVersion: to.Ptr("1.XX.Y"), ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ Name: to.Ptr("my-managed-rg"), Location: to.Ptr("East US"), }, NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), }}, L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ { IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), }}, TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), }}, }, BgpServiceLoadBalancerConfiguration: &armnetworkcloud.BgpServiceLoadBalancerConfiguration{ BgpAdvertisements: []*armnetworkcloud.BgpAdvertisement{ { AdvertiseToFabric: to.Ptr(armnetworkcloud.AdvertiseToFabricTrue), Communities: []*string{ to.Ptr("64512:100")}, IPAddressPools: []*string{ to.Ptr("pool1")}, Peers: []*string{ to.Ptr("peer1")}, }}, BgpPeers: []*armnetworkcloud.ServiceLoadBalancerBgpPeer{ { Name: to.Ptr("peer1"), BfdEnabled: to.Ptr(armnetworkcloud.BfdEnabledFalse), BgpMultiHop: to.Ptr(armnetworkcloud.BgpMultiHopFalse), HoldTime: to.Ptr("P300s"), KeepAliveTime: to.Ptr("P300s"), MyAsn: to.Ptr[int64](64512), PeerAddress: to.Ptr("203.0.113.254"), PeerAsn: to.Ptr[int64](64497), PeerPort: to.Ptr[int64](179), }}, FabricPeeringEnabled: to.Ptr(armnetworkcloud.FabricPeeringEnabledTrue), IPAddressPools: []*armnetworkcloud.IPAddressPool{ { Name: to.Ptr("pool1"), Addresses: []*string{ to.Ptr("198.51.102.0/24")}, AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), OnlyUseHostIPs: to.Ptr(armnetworkcloud.BfdEnabledTrue), }}, }, CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), DNSServiceIP: to.Ptr("198.51.101.2"), PodCidrs: []*string{ to.Ptr("198.51.100.0/24")}, ServiceCidrs: []*string{ to.Ptr("198.51.101.0/24")}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesCluster = armnetworkcloud.KubernetesCluster{ // Name: to.Ptr("KubernetesClusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.KubernetesClusterProperties{ // AADConfiguration: &armnetworkcloud.AADConfiguration{ // AdminGroupObjectIDs: []*string{ // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, // }, // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AttachedNetworkIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ // { // Name: to.Ptr("Feature1"), // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("No issues detected"), // Version: to.Ptr("1"), // }}, // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ // { // Name: to.Ptr("SystemPool-1"), // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }}, // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // BgpServiceLoadBalancerConfiguration: &armnetworkcloud.BgpServiceLoadBalancerConfiguration{ // BgpAdvertisements: []*armnetworkcloud.BgpAdvertisement{ // { // AdvertiseToFabric: to.Ptr(armnetworkcloud.AdvertiseToFabricTrue), // Communities: []*string{ // to.Ptr("64512:100")}, // IPAddressPools: []*string{ // to.Ptr("pool1")}, // Peers: []*string{ // to.Ptr("peer1")}, // }}, // BgpPeers: []*armnetworkcloud.ServiceLoadBalancerBgpPeer{ // { // Name: to.Ptr("peer1"), // BfdEnabled: to.Ptr(armnetworkcloud.BfdEnabledFalse), // BgpMultiHop: to.Ptr(armnetworkcloud.BgpMultiHopFalse), // HoldTime: to.Ptr("P300s"), // KeepAliveTime: to.Ptr("P300s"), // MyAsn: to.Ptr[int64](64512), // PeerAddress: to.Ptr("203.0.113.254"), // PeerAsn: to.Ptr[int64](64497), // PeerPort: to.Ptr[int64](179), // }}, // FabricPeeringEnabled: to.Ptr(armnetworkcloud.FabricPeeringEnabledTrue), // IPAddressPools: []*armnetworkcloud.IPAddressPool{ // { // Name: to.Ptr("pool1"), // Addresses: []*string{ // to.Ptr("198.51.102.0/24")}, // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), // OnlyUseHostIPs: to.Ptr(armnetworkcloud.BfdEnabledTrue), // }}, // }, // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DNSServiceIP: to.Ptr("198.51.101.2"), // PodCidrs: []*string{ // to.Ptr("198.51.100.0/24")}, // ServiceCidrs: []*string{ // to.Ptr("198.51.101.0/24")}, // }, // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("kubernetesClusterName-SystemPool-1-md-cqjvd"), // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](46), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // MemorySizeGB: to.Ptr[int64](224), // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.4"), // MacAddress: to.Ptr("aa:bb:cc:06:79:2a"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.12"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::a"), // MacAddress: to.Ptr("aa:bb:cc:ad:40:cf"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleWorker), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // { // Name: to.Ptr("kubernetesClusterName-control-plane-7nsh2"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](6), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // MemorySizeGB: to.Ptr[int64](28), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.2"), // MacAddress: to.Ptr("aa:bb:cc:fa:91:71"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.11"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::9"), // MacAddress: to.Ptr("aa:bb:cc:c8:a2:40"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateOrUpdateKubernetesClusterWithALayer2LoadBalancer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_L2LoadBalancer_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClustersClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "kubernetesClusterName", armnetworkcloud.KubernetesCluster{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.KubernetesClusterProperties{ AADConfiguration: &armnetworkcloud.AADConfiguration{ AdminGroupObjectIDs: []*string{ to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, }, AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, AvailabilityZones: []*string{ to.Ptr("1"), to.Ptr("2"), to.Ptr("3")}, Count: to.Ptr[int64](3), VMSKUName: to.Ptr("NC_G6_28_v1"), }, InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ { Name: to.Ptr("SystemPool-1"), AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ AdminUsername: to.Ptr("azure"), SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, AgentOptions: &armnetworkcloud.AgentOptions{ HugepagesCount: to.Ptr[int64](96), HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), }, AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), }}, L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ { IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), }}, TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), }}, }, AvailabilityZones: []*string{ to.Ptr("1"), to.Ptr("2"), to.Ptr("3")}, Count: to.Ptr[int64](3), Labels: []*armnetworkcloud.KubernetesLabel{ { Key: to.Ptr("kubernetes.label"), Value: to.Ptr("true"), }}, Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), Taints: []*armnetworkcloud.KubernetesLabel{ { Key: to.Ptr("kubernetes.taint"), Value: to.Ptr("true:NoSchedule"), }}, UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ MaxSurge: to.Ptr("1"), }, VMSKUName: to.Ptr("NC_P46_224_v1"), }}, KubernetesVersion: to.Ptr("1.XX.Y"), ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ Name: to.Ptr("my-managed-rg"), Location: to.Ptr("East US"), }, NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), }}, L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ { IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), }}, TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ { NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), }}, }, CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), DNSServiceIP: to.Ptr("198.51.101.2"), L2ServiceLoadBalancerConfiguration: &armnetworkcloud.L2ServiceLoadBalancerConfiguration{ IPAddressPools: []*armnetworkcloud.IPAddressPool{ { Name: to.Ptr("pool1"), Addresses: []*string{ to.Ptr("198.51.102.2-198.51.102.254")}, AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), }}, }, PodCidrs: []*string{ to.Ptr("198.51.100.0/24")}, ServiceCidrs: []*string{ to.Ptr("198.51.101.0/24")}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesCluster = armnetworkcloud.KubernetesCluster{ // Name: to.Ptr("KubernetesClusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.KubernetesClusterProperties{ // AADConfiguration: &armnetworkcloud.AADConfiguration{ // AdminGroupObjectIDs: []*string{ // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, // }, // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AttachedNetworkIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ // { // Name: to.Ptr("Feature1"), // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("No issues detected"), // Version: to.Ptr("1"), // }}, // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ // { // Name: to.Ptr("SystemPool-1"), // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }}, // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DNSServiceIP: to.Ptr("198.51.101.2"), // L2ServiceLoadBalancerConfiguration: &armnetworkcloud.L2ServiceLoadBalancerConfiguration{ // IPAddressPools: []*armnetworkcloud.IPAddressPool{ // { // Name: to.Ptr("pool1"), // Addresses: []*string{ // to.Ptr("198.51.102.2-198.51.102.254")}, // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), // }}, // }, // PodCidrs: []*string{ // to.Ptr("198.51.100.0/24")}, // ServiceCidrs: []*string{ // to.Ptr("198.51.101.0/24")}, // }, // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("kubernetesClusterName-SystemPool-1-md-cqjvd"), // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](46), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // MemorySizeGB: to.Ptr[int64](224), // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.4"), // MacAddress: to.Ptr("aa:bb:cc:06:79:2a"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.12"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::a"), // MacAddress: to.Ptr("aa:bb:cc:ad:40:cf"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleWorker), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // { // Name: to.Ptr("kubernetesClusterName-control-plane-7nsh2"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](6), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // MemorySizeGB: to.Ptr[int64](28), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.2"), // MacAddress: to.Ptr("aa:bb:cc:fa:91:71"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.11"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::9"), // MacAddress: to.Ptr("aa:bb:cc:c8:a2:40"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } }
Output:
func (*KubernetesClustersClient) BeginDelete ¶ added in v0.2.0
func (client *KubernetesClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, kubernetesClusterName string, options *KubernetesClustersClientBeginDeleteOptions) (*runtime.Poller[KubernetesClustersClientDeleteResponse], error)
BeginDelete - Delete the provided Kubernetes cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- options - KubernetesClustersClientBeginDeleteOptions contains the optional parameters for the KubernetesClustersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClustersClient().BeginDelete(ctx, "resourceGroupName", "kubernetesClusterName", 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 (*KubernetesClustersClient) BeginRestartNode ¶ added in v0.2.0
func (client *KubernetesClustersClient) BeginRestartNode(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterRestartNodeParameters KubernetesClusterRestartNodeParameters, options *KubernetesClustersClientBeginRestartNodeOptions) (*runtime.Poller[KubernetesClustersClientRestartNodeResponse], error)
BeginRestartNode - Restart a targeted node of a Kubernetes cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- kubernetesClusterRestartNodeParameters - The request body.
- options - KubernetesClustersClientBeginRestartNodeOptions contains the optional parameters for the KubernetesClustersClient.BeginRestartNode method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_RestartNode.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClustersClient().BeginRestartNode(ctx, "resourceGroupName", "kubernetesClusterName", armnetworkcloud.KubernetesClusterRestartNodeParameters{ NodeName: to.Ptr("nodeName"), }, 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 (*KubernetesClustersClient) BeginUpdate ¶ added in v0.2.0
func (client *KubernetesClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, kubernetesClusterName string, kubernetesClusterUpdateParameters KubernetesClusterPatchParameters, options *KubernetesClustersClientBeginUpdateOptions) (*runtime.Poller[KubernetesClustersClientUpdateResponse], error)
BeginUpdate - Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- kubernetesClusterUpdateParameters - The request body.
- options - KubernetesClustersClientBeginUpdateOptions contains the optional parameters for the KubernetesClustersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewKubernetesClustersClient().BeginUpdate(ctx, "resourceGroupName", "kubernetesClusterName", armnetworkcloud.KubernetesClusterPatchParameters{ Properties: &armnetworkcloud.KubernetesClusterPatchProperties{ AdministratorConfiguration: &armnetworkcloud.AdministratorConfigurationPatch{ SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodePatchConfiguration{ AdministratorConfiguration: &armnetworkcloud.AdministratorConfigurationPatch{ SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, }, Count: to.Ptr[int64](3), }, KubernetesVersion: to.Ptr("1.XX.Y"), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesCluster = armnetworkcloud.KubernetesCluster{ // Name: to.Ptr("KubernetesClusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.KubernetesClusterProperties{ // AADConfiguration: &armnetworkcloud.AADConfiguration{ // AdminGroupObjectIDs: []*string{ // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, // }, // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AttachedNetworkIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ // { // Name: to.Ptr("Feature1"), // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("No issues detected"), // Version: to.Ptr("1"), // }}, // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ // { // Name: to.Ptr("SystemPool-1"), // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }}, // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // BgpServiceLoadBalancerConfiguration: &armnetworkcloud.BgpServiceLoadBalancerConfiguration{ // BgpAdvertisements: []*armnetworkcloud.BgpAdvertisement{ // { // AdvertiseToFabric: to.Ptr(armnetworkcloud.AdvertiseToFabricTrue), // Communities: []*string{ // to.Ptr("64512:100")}, // IPAddressPools: []*string{ // to.Ptr("pool1")}, // Peers: []*string{ // to.Ptr("peer1")}, // }}, // BgpPeers: []*armnetworkcloud.ServiceLoadBalancerBgpPeer{ // { // Name: to.Ptr("peer1"), // BfdEnabled: to.Ptr(armnetworkcloud.BfdEnabledFalse), // BgpMultiHop: to.Ptr(armnetworkcloud.BgpMultiHopFalse), // HoldTime: to.Ptr("P300s"), // KeepAliveTime: to.Ptr("P300s"), // MyAsn: to.Ptr[int64](64512), // PeerAddress: to.Ptr("203.0.113.254"), // PeerAsn: to.Ptr[int64](64497), // PeerPort: to.Ptr[int64](179), // }}, // FabricPeeringEnabled: to.Ptr(armnetworkcloud.FabricPeeringEnabledTrue), // IPAddressPools: []*armnetworkcloud.IPAddressPool{ // { // Name: to.Ptr("pool1"), // Addresses: []*string{ // to.Ptr("198.51.102.0/24")}, // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), // OnlyUseHostIPs: to.Ptr(armnetworkcloud.BfdEnabledTrue), // }}, // }, // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DNSServiceIP: to.Ptr("198.51.101.2"), // PodCidrs: []*string{ // to.Ptr("198.51.100.0/24")}, // ServiceCidrs: []*string{ // to.Ptr("198.51.101.0/24")}, // }, // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("kubernetesClusterName-SystemPool-1-md-cqjvd"), // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](46), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // MemorySizeGB: to.Ptr[int64](224), // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.4"), // MacAddress: to.Ptr("aa:bb:cc:06:79:2a"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.12"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::a"), // MacAddress: to.Ptr("aa:bb:cc:ad:40:cf"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleWorker), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // { // Name: to.Ptr("kubernetesClusterName-control-plane-7nsh2"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](6), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // MemorySizeGB: to.Ptr[int64](28), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.2"), // MacAddress: to.Ptr("aa:bb:cc:fa:91:71"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.11"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::9"), // MacAddress: to.Ptr("aa:bb:cc:c8:a2:40"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } }
Output:
func (*KubernetesClustersClient) Get ¶ added in v0.2.0
func (client *KubernetesClustersClient) Get(ctx context.Context, resourceGroupName string, kubernetesClusterName string, options *KubernetesClustersClientGetOptions) (KubernetesClustersClientGetResponse, error)
Get - Get properties of the provided the Kubernetes cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- kubernetesClusterName - The name of the Kubernetes cluster.
- options - KubernetesClustersClientGetOptions contains the optional parameters for the KubernetesClustersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewKubernetesClustersClient().Get(ctx, "resourceGroupName", "kubernetesClusterName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.KubernetesCluster = armnetworkcloud.KubernetesCluster{ // Name: to.Ptr("KubernetesClusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.KubernetesClusterProperties{ // AADConfiguration: &armnetworkcloud.AADConfiguration{ // AdminGroupObjectIDs: []*string{ // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, // }, // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AttachedNetworkIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ // { // Name: to.Ptr("Feature1"), // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("No issues detected"), // Version: to.Ptr("1"), // }}, // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ // { // Name: to.Ptr("SystemPool-1"), // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }}, // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // BgpServiceLoadBalancerConfiguration: &armnetworkcloud.BgpServiceLoadBalancerConfiguration{ // BgpAdvertisements: []*armnetworkcloud.BgpAdvertisement{ // { // AdvertiseToFabric: to.Ptr(armnetworkcloud.AdvertiseToFabricTrue), // Communities: []*string{ // to.Ptr("64512:100")}, // IPAddressPools: []*string{ // to.Ptr("pool1")}, // Peers: []*string{ // to.Ptr("peer1")}, // }}, // BgpPeers: []*armnetworkcloud.ServiceLoadBalancerBgpPeer{ // { // Name: to.Ptr("peer1"), // BfdEnabled: to.Ptr(armnetworkcloud.BfdEnabledFalse), // BgpMultiHop: to.Ptr(armnetworkcloud.BgpMultiHopFalse), // HoldTime: to.Ptr("P300s"), // KeepAliveTime: to.Ptr("P300s"), // MyAsn: to.Ptr[int64](64512), // PeerAddress: to.Ptr("203.0.113.254"), // PeerAsn: to.Ptr[int64](64497), // PeerPort: to.Ptr[int64](179), // }}, // FabricPeeringEnabled: to.Ptr(armnetworkcloud.FabricPeeringEnabledTrue), // IPAddressPools: []*armnetworkcloud.IPAddressPool{ // { // Name: to.Ptr("pool1"), // Addresses: []*string{ // to.Ptr("198.51.102.0/24")}, // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), // OnlyUseHostIPs: to.Ptr(armnetworkcloud.BfdEnabledTrue), // }}, // }, // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DNSServiceIP: to.Ptr("198.51.101.2"), // PodCidrs: []*string{ // to.Ptr("198.51.100.0/24")}, // ServiceCidrs: []*string{ // to.Ptr("198.51.101.0/24")}, // }, // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("kubernetesClusterName-SystemPool-1-md-cqjvd"), // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](46), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // MemorySizeGB: to.Ptr[int64](224), // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.4"), // MacAddress: to.Ptr("aa:bb:cc:06:79:2a"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.12"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::a"), // MacAddress: to.Ptr("aa:bb:cc:ad:40:cf"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleWorker), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // { // Name: to.Ptr("kubernetesClusterName-control-plane-7nsh2"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](6), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // MemorySizeGB: to.Ptr[int64](28), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.2"), // MacAddress: to.Ptr("aa:bb:cc:fa:91:71"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.11"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::9"), // MacAddress: to.Ptr("aa:bb:cc:c8:a2:40"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // } }
Output:
func (*KubernetesClustersClient) NewListByResourceGroupPager ¶ added in v0.2.0
func (client *KubernetesClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *KubernetesClustersClientListByResourceGroupOptions) *runtime.Pager[KubernetesClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of Kubernetes clusters in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - KubernetesClustersClientListByResourceGroupOptions contains the optional parameters for the KubernetesClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewKubernetesClustersClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.KubernetesClusterList = armnetworkcloud.KubernetesClusterList{ // Value: []*armnetworkcloud.KubernetesCluster{ // { // Name: to.Ptr("KubernetesClusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.KubernetesClusterProperties{ // AADConfiguration: &armnetworkcloud.AADConfiguration{ // AdminGroupObjectIDs: []*string{ // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, // }, // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AttachedNetworkIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ // { // Name: to.Ptr("Feature1"), // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("No issues detected"), // Version: to.Ptr("1"), // }}, // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ // { // Name: to.Ptr("SystemPool-1"), // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }}, // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // BgpServiceLoadBalancerConfiguration: &armnetworkcloud.BgpServiceLoadBalancerConfiguration{ // BgpAdvertisements: []*armnetworkcloud.BgpAdvertisement{ // { // AdvertiseToFabric: to.Ptr(armnetworkcloud.AdvertiseToFabricTrue), // Communities: []*string{ // to.Ptr("64512:100")}, // IPAddressPools: []*string{ // to.Ptr("pool1")}, // Peers: []*string{ // to.Ptr("peer1")}, // }}, // BgpPeers: []*armnetworkcloud.ServiceLoadBalancerBgpPeer{ // { // Name: to.Ptr("peer1"), // BfdEnabled: to.Ptr(armnetworkcloud.BfdEnabledFalse), // BgpMultiHop: to.Ptr(armnetworkcloud.BgpMultiHopFalse), // HoldTime: to.Ptr("P300s"), // KeepAliveTime: to.Ptr("P300s"), // MyAsn: to.Ptr[int64](64512), // PeerAddress: to.Ptr("203.0.113.254"), // PeerAsn: to.Ptr[int64](64497), // PeerPort: to.Ptr[int64](179), // }}, // FabricPeeringEnabled: to.Ptr(armnetworkcloud.FabricPeeringEnabledTrue), // IPAddressPools: []*armnetworkcloud.IPAddressPool{ // { // Name: to.Ptr("pool1"), // Addresses: []*string{ // to.Ptr("198.51.102.0/24")}, // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), // OnlyUseHostIPs: to.Ptr(armnetworkcloud.BfdEnabledTrue), // }}, // }, // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DNSServiceIP: to.Ptr("198.51.101.2"), // PodCidrs: []*string{ // to.Ptr("198.51.100.0/24")}, // ServiceCidrs: []*string{ // to.Ptr("198.51.101.0/24")}, // }, // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("kubernetesClusterName-SystemPool-1-md-cqjvd"), // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](46), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // MemorySizeGB: to.Ptr[int64](224), // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.4"), // MacAddress: to.Ptr("aa:bb:cc:06:79:2a"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.12"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::a"), // MacAddress: to.Ptr("aa:bb:cc:ad:40:cf"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleWorker), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // { // Name: to.Ptr("kubernetesClusterName-control-plane-7nsh2"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](6), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // MemorySizeGB: to.Ptr[int64](28), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.2"), // MacAddress: to.Ptr("aa:bb:cc:fa:91:71"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.11"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::9"), // MacAddress: to.Ptr("aa:bb:cc:c8:a2:40"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*KubernetesClustersClient) NewListBySubscriptionPager ¶ added in v0.2.0
func (client *KubernetesClustersClient) NewListBySubscriptionPager(options *KubernetesClustersClientListBySubscriptionOptions) *runtime.Pager[KubernetesClustersClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of Kubernetes clusters in the provided subscription.
Generated from API version 2024-07-01
- options - KubernetesClustersClientListBySubscriptionOptions contains the optional parameters for the KubernetesClustersClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/KubernetesClusters_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewKubernetesClustersClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.KubernetesClusterList = armnetworkcloud.KubernetesClusterList{ // Value: []*armnetworkcloud.KubernetesCluster{ // { // Name: to.Ptr("KubernetesClusterName"), // Type: to.Ptr("Microsoft.NetworkCloud/kubernetesClusters"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.KubernetesClusterProperties{ // AADConfiguration: &armnetworkcloud.AADConfiguration{ // AdminGroupObjectIDs: []*string{ // to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff")}, // }, // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AttachedNetworkIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")}, // AvailableUpgrades: []*armnetworkcloud.AvailableUpgrade{ // { // AvailabilityLifecycle: to.Ptr(armnetworkcloud.AvailabilityLifecycleGenerallyAvailable), // Version: to.Ptr("1.XX.Y"), // }}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // ConnectedClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Kubernetes/connectedClusters/connectedClusterName"), // ControlPlaneKubernetesVersion: to.Ptr("1.XX.Y"), // ControlPlaneNodeConfiguration: &armnetworkcloud.ControlPlaneNodeConfiguration{ // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }, // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Kubernetes cluster is operational"), // FeatureStatuses: []*armnetworkcloud.FeatureStatus{ // { // Name: to.Ptr("Feature1"), // DetailedStatus: to.Ptr(armnetworkcloud.FeatureDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("No issues detected"), // Version: to.Ptr("1"), // }}, // InitialAgentPoolConfigurations: []*armnetworkcloud.InitialAgentPoolConfiguration{ // { // Name: to.Ptr("SystemPool-1"), // AdministratorConfiguration: &armnetworkcloud.AdministratorConfiguration{ // AdminUsername: to.Ptr("azure"), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // }, // AgentOptions: &armnetworkcloud.AgentOptions{ // HugepagesCount: to.Ptr[int64](96), // HugepagesSize: to.Ptr(armnetworkcloud.HugepagesSizeOneG), // }, // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // AvailabilityZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int64](3), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // UpgradeSettings: &armnetworkcloud.AgentPoolUpgradeSettings{ // MaxSurge: to.Ptr("1"), // }, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }}, // KubernetesVersion: to.Ptr("1.XX.Y"), // ManagedResourceGroupConfiguration: &armnetworkcloud.ManagedResourceGroupConfiguration{ // Name: to.Ptr("my-managed-rg"), // Location: to.Ptr("East US"), // }, // NetworkConfiguration: &armnetworkcloud.NetworkConfiguration{ // AttachedNetworkConfiguration: &armnetworkcloud.AttachedNetworkConfiguration{ // L2Networks: []*armnetworkcloud.L2NetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeDPDK), // }}, // L3Networks: []*armnetworkcloud.L3NetworkAttachmentConfiguration{ // { // IpamEnabled: to.Ptr(armnetworkcloud.L3NetworkConfigurationIpamEnabledFalse), // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeSRIOV), // }}, // TrunkedNetworks: []*armnetworkcloud.TrunkedNetworkAttachmentConfiguration{ // { // NetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // PluginType: to.Ptr(armnetworkcloud.KubernetesPluginTypeMACVLAN), // }}, // }, // BgpServiceLoadBalancerConfiguration: &armnetworkcloud.BgpServiceLoadBalancerConfiguration{ // BgpAdvertisements: []*armnetworkcloud.BgpAdvertisement{ // { // AdvertiseToFabric: to.Ptr(armnetworkcloud.AdvertiseToFabricTrue), // Communities: []*string{ // to.Ptr("64512:100")}, // IPAddressPools: []*string{ // to.Ptr("pool1")}, // Peers: []*string{ // to.Ptr("peer1")}, // }}, // BgpPeers: []*armnetworkcloud.ServiceLoadBalancerBgpPeer{ // { // Name: to.Ptr("peer1"), // BfdEnabled: to.Ptr(armnetworkcloud.BfdEnabledFalse), // BgpMultiHop: to.Ptr(armnetworkcloud.BgpMultiHopFalse), // HoldTime: to.Ptr("P300s"), // KeepAliveTime: to.Ptr("P300s"), // MyAsn: to.Ptr[int64](64512), // PeerAddress: to.Ptr("203.0.113.254"), // PeerAsn: to.Ptr[int64](64497), // PeerPort: to.Ptr[int64](179), // }}, // FabricPeeringEnabled: to.Ptr(armnetworkcloud.FabricPeeringEnabledTrue), // IPAddressPools: []*armnetworkcloud.IPAddressPool{ // { // Name: to.Ptr("pool1"), // Addresses: []*string{ // to.Ptr("198.51.102.0/24")}, // AutoAssign: to.Ptr(armnetworkcloud.BfdEnabledTrue), // OnlyUseHostIPs: to.Ptr(armnetworkcloud.BfdEnabledTrue), // }}, // }, // CloudServicesNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // CniNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DNSServiceIP: to.Ptr("198.51.101.2"), // PodCidrs: []*string{ // to.Ptr("198.51.100.0/24")}, // ServiceCidrs: []*string{ // to.Ptr("198.51.101.0/24")}, // }, // Nodes: []*armnetworkcloud.KubernetesClusterNode{ // { // Name: to.Ptr("kubernetesClusterName-SystemPool-1-md-cqjvd"), // AgentPoolID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/kubernetesClusters/kubernetesClusterName/agentPools/agentPoolName"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](46), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // Labels: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.label"), // Value: to.Ptr("true"), // }}, // MemorySizeGB: to.Ptr[int64](224), // Mode: to.Ptr(armnetworkcloud.AgentPoolModeSystem), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.4"), // MacAddress: to.Ptr("aa:bb:cc:06:79:2a"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.12"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::a"), // MacAddress: to.Ptr("aa:bb:cc:ad:40:cf"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleWorker), // Taints: []*armnetworkcloud.KubernetesLabel{ // { // Key: to.Ptr("kubernetes.taint"), // Value: to.Ptr("true:NoSchedule"), // }}, // VMSKUName: to.Ptr("NC_P46_224_v1"), // }, // { // Name: to.Ptr("kubernetesClusterName-control-plane-7nsh2"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // CPUCores: to.Ptr[int64](6), // DetailedStatus: to.Ptr(armnetworkcloud.KubernetesClusterNodeDetailedStatusRunning), // DetailedStatusMessage: to.Ptr("Running - virtual machine is running."), // DiskSizeGB: to.Ptr[int64](300), // Image: to.Ptr("mariner-guest-image-qcow2-k8s-1.XX.Y"), // KubernetesVersion: to.Ptr("v1.XX.Y"), // MemorySizeGB: to.Ptr[int64](28), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("169.254.8.2"), // MacAddress: to.Ptr("aa:bb:cc:fa:91:71"), // NetworkAttachmentName: to.Ptr("cloudservices"), // }, // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayFalse), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("10.14.48.11"), // IPv6Address: to.Ptr("fda0:d59c:da0a:e30::9"), // MacAddress: to.Ptr("aa:bb:cc:c8:a2:40"), // NetworkAttachmentName: to.Ptr("defaultcni"), // }}, // PowerState: to.Ptr(armnetworkcloud.KubernetesNodePowerStateOn), // Role: to.Ptr(armnetworkcloud.KubernetesNodeRoleControlPlane), // VMSKUName: to.Ptr("NC_G6_28_v1"), // }}, // ProvisioningState: to.Ptr(armnetworkcloud.KubernetesClusterProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type KubernetesClustersClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type KubernetesClustersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the KubernetesClustersClient.BeginCreateOrUpdate method.
type KubernetesClustersClientBeginDeleteOptions ¶ added in v0.2.0
type KubernetesClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClustersClientBeginDeleteOptions contains the optional parameters for the KubernetesClustersClient.BeginDelete method.
type KubernetesClustersClientBeginRestartNodeOptions ¶ added in v0.2.0
type KubernetesClustersClientBeginRestartNodeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClustersClientBeginRestartNodeOptions contains the optional parameters for the KubernetesClustersClient.BeginRestartNode method.
type KubernetesClustersClientBeginUpdateOptions ¶ added in v0.2.0
type KubernetesClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
KubernetesClustersClientBeginUpdateOptions contains the optional parameters for the KubernetesClustersClient.BeginUpdate method.
type KubernetesClustersClientCreateOrUpdateResponse ¶ added in v0.2.0
type KubernetesClustersClientCreateOrUpdateResponse struct { // KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. KubernetesCluster }
KubernetesClustersClientCreateOrUpdateResponse contains the response from method KubernetesClustersClient.BeginCreateOrUpdate.
type KubernetesClustersClientDeleteResponse ¶ added in v0.2.0
type KubernetesClustersClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
KubernetesClustersClientDeleteResponse contains the response from method KubernetesClustersClient.BeginDelete.
type KubernetesClustersClientGetOptions ¶ added in v0.2.0
type KubernetesClustersClientGetOptions struct { }
KubernetesClustersClientGetOptions contains the optional parameters for the KubernetesClustersClient.Get method.
type KubernetesClustersClientGetResponse ¶ added in v0.2.0
type KubernetesClustersClientGetResponse struct { // KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. KubernetesCluster }
KubernetesClustersClientGetResponse contains the response from method KubernetesClustersClient.Get.
type KubernetesClustersClientListByResourceGroupOptions ¶ added in v0.2.0
type KubernetesClustersClientListByResourceGroupOptions struct { }
KubernetesClustersClientListByResourceGroupOptions contains the optional parameters for the KubernetesClustersClient.NewListByResourceGroupPager method.
type KubernetesClustersClientListByResourceGroupResponse ¶ added in v0.2.0
type KubernetesClustersClientListByResourceGroupResponse struct { // KubernetesClusterList represents a list of Kubernetes clusters. KubernetesClusterList }
KubernetesClustersClientListByResourceGroupResponse contains the response from method KubernetesClustersClient.NewListByResourceGroupPager.
type KubernetesClustersClientListBySubscriptionOptions ¶ added in v0.2.0
type KubernetesClustersClientListBySubscriptionOptions struct { }
KubernetesClustersClientListBySubscriptionOptions contains the optional parameters for the KubernetesClustersClient.NewListBySubscriptionPager method.
type KubernetesClustersClientListBySubscriptionResponse ¶ added in v0.2.0
type KubernetesClustersClientListBySubscriptionResponse struct { // KubernetesClusterList represents a list of Kubernetes clusters. KubernetesClusterList }
KubernetesClustersClientListBySubscriptionResponse contains the response from method KubernetesClustersClient.NewListBySubscriptionPager.
type KubernetesClustersClientRestartNodeResponse ¶ added in v0.2.0
type KubernetesClustersClientRestartNodeResponse struct { // The current status of an async operation. OperationStatusResult }
KubernetesClustersClientRestartNodeResponse contains the response from method KubernetesClustersClient.BeginRestartNode.
type KubernetesClustersClientUpdateResponse ¶ added in v0.2.0
type KubernetesClustersClientUpdateResponse struct { // KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. KubernetesCluster }
KubernetesClustersClientUpdateResponse contains the response from method KubernetesClustersClient.BeginUpdate.
type KubernetesLabel ¶ added in v0.2.0
type KubernetesLabel struct { // REQUIRED; The name of the label or taint. Key *string // REQUIRED; The value of the label or taint. Value *string }
KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod.
func (KubernetesLabel) MarshalJSON ¶ added in v0.2.0
func (k KubernetesLabel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KubernetesLabel.
func (*KubernetesLabel) UnmarshalJSON ¶ added in v0.2.0
func (k *KubernetesLabel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesLabel.
type KubernetesNodePowerState ¶ added in v0.2.0
type KubernetesNodePowerState string
KubernetesNodePowerState - The power state of this node.
const ( KubernetesNodePowerStateOff KubernetesNodePowerState = "Off" KubernetesNodePowerStateOn KubernetesNodePowerState = "On" KubernetesNodePowerStateUnknown KubernetesNodePowerState = "Unknown" )
func PossibleKubernetesNodePowerStateValues ¶ added in v0.2.0
func PossibleKubernetesNodePowerStateValues() []KubernetesNodePowerState
PossibleKubernetesNodePowerStateValues returns the possible values for the KubernetesNodePowerState const type.
type KubernetesNodeRole ¶ added in v0.2.0
type KubernetesNodeRole string
KubernetesNodeRole - The role of this node in the cluster.
const ( KubernetesNodeRoleControlPlane KubernetesNodeRole = "ControlPlane" KubernetesNodeRoleWorker KubernetesNodeRole = "Worker" )
func PossibleKubernetesNodeRoleValues ¶ added in v0.2.0
func PossibleKubernetesNodeRoleValues() []KubernetesNodeRole
PossibleKubernetesNodeRoleValues returns the possible values for the KubernetesNodeRole const type.
type KubernetesPluginType ¶ added in v0.2.0
type KubernetesPluginType string
KubernetesPluginType - The indicator of how this network will be utilized by the Kubernetes cluster.
const ( KubernetesPluginTypeDPDK KubernetesPluginType = "DPDK" KubernetesPluginTypeIPVLAN KubernetesPluginType = "IPVLAN" KubernetesPluginTypeMACVLAN KubernetesPluginType = "MACVLAN" KubernetesPluginTypeOSDevice KubernetesPluginType = "OSDevice" KubernetesPluginTypeSRIOV KubernetesPluginType = "SRIOV" )
func PossibleKubernetesPluginTypeValues ¶ added in v0.2.0
func PossibleKubernetesPluginTypeValues() []KubernetesPluginType
PossibleKubernetesPluginTypeValues returns the possible values for the KubernetesPluginType const type.
type L2Network ¶
type L2Network struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *L2NetworkProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources.
func (L2Network) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type L2Network.
func (*L2Network) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type L2Network.
type L2NetworkAttachmentConfiguration ¶ added in v0.2.0
type L2NetworkAttachmentConfiguration struct { // REQUIRED; The resource ID of the network that is being configured for attachment. NetworkID *string // The indicator of how this network will be utilized by the Kubernetes cluster. PluginType *KubernetesPluginType }
L2NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 2 network.
func (L2NetworkAttachmentConfiguration) MarshalJSON ¶ added in v0.2.0
func (l L2NetworkAttachmentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L2NetworkAttachmentConfiguration.
func (*L2NetworkAttachmentConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (l *L2NetworkAttachmentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L2NetworkAttachmentConfiguration.
type L2NetworkDetailedStatus ¶
type L2NetworkDetailedStatus string
L2NetworkDetailedStatus - The more detailed status of the L2 network.
const ( L2NetworkDetailedStatusAvailable L2NetworkDetailedStatus = "Available" L2NetworkDetailedStatusError L2NetworkDetailedStatus = "Error" L2NetworkDetailedStatusProvisioning L2NetworkDetailedStatus = "Provisioning" )
func PossibleL2NetworkDetailedStatusValues ¶
func PossibleL2NetworkDetailedStatusValues() []L2NetworkDetailedStatus
PossibleL2NetworkDetailedStatusValues returns the possible values for the L2NetworkDetailedStatus const type.
type L2NetworkList ¶
type L2NetworkList struct { // The link used to get the next page of operations. NextLink *string // The list of L2 networks. Value []*L2Network }
L2NetworkList represents a list of L2 networks.
func (L2NetworkList) MarshalJSON ¶
func (l L2NetworkList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L2NetworkList.
func (*L2NetworkList) UnmarshalJSON ¶
func (l *L2NetworkList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L2NetworkList.
type L2NetworkPatchParameters ¶
type L2NetworkPatchParameters struct { // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
L2NetworkPatchParameters represents the body of the request to patch the L2 network.
func (L2NetworkPatchParameters) MarshalJSON ¶
func (l L2NetworkPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L2NetworkPatchParameters.
func (*L2NetworkPatchParameters) UnmarshalJSON ¶
func (l *L2NetworkPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L2NetworkPatchParameters.
type L2NetworkProperties ¶
type L2NetworkProperties struct { // REQUIRED; The resource ID of the Network Fabric l2IsolationDomain. L2IsolationDomainID *string // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network // plugin type for Hybrid AKS. HybridAksPluginType *HybridAksPluginType // The default interface name for this L2 network in the virtual machine. This name can be overridden by the name supplied // in the network attachment configuration of that virtual machine. InterfaceName *string // READ-ONLY; The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. AssociatedResourceIDs []*string // READ-ONLY; The resource ID of the Network Cloud cluster this L2 network is associated with. ClusterID *string // READ-ONLY; The more detailed status of the L2 network. DetailedStatus *L2NetworkDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource ID(s) that are // associated with this L2 network. HybridAksClustersAssociatedIDs []*string // READ-ONLY; The provisioning state of the L2 network. ProvisioningState *L2NetworkProvisioningState // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding // any Hybrid AKS virtual machines, that are currently using this L2 network. VirtualMachinesAssociatedIDs []*string }
L2NetworkProperties represents properties of the L2 network.
func (L2NetworkProperties) MarshalJSON ¶
func (l L2NetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L2NetworkProperties.
func (*L2NetworkProperties) UnmarshalJSON ¶
func (l *L2NetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L2NetworkProperties.
type L2NetworkProvisioningState ¶
type L2NetworkProvisioningState string
L2NetworkProvisioningState - The provisioning state of the L2 network.
const ( L2NetworkProvisioningStateAccepted L2NetworkProvisioningState = "Accepted" L2NetworkProvisioningStateCanceled L2NetworkProvisioningState = "Canceled" L2NetworkProvisioningStateFailed L2NetworkProvisioningState = "Failed" L2NetworkProvisioningStateProvisioning L2NetworkProvisioningState = "Provisioning" L2NetworkProvisioningStateSucceeded L2NetworkProvisioningState = "Succeeded" )
func PossibleL2NetworkProvisioningStateValues ¶
func PossibleL2NetworkProvisioningStateValues() []L2NetworkProvisioningState
PossibleL2NetworkProvisioningStateValues returns the possible values for the L2NetworkProvisioningState const type.
type L2NetworksClient ¶
type L2NetworksClient struct {
// contains filtered or unexported fields
}
L2NetworksClient contains the methods for the L2Networks group. Don't use this type directly, use NewL2NetworksClient() instead.
func NewL2NetworksClient ¶
func NewL2NetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*L2NetworksClient, error)
NewL2NetworksClient creates a new instance of L2NetworksClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*L2NetworksClient) BeginCreateOrUpdate ¶
func (client *L2NetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, l2NetworkName string, l2NetworkParameters L2Network, options *L2NetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[L2NetworksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new layer 2 (L2) network or update the properties of the existing network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l2NetworkName - The name of the L2 network.
- l2NetworkParameters - The request body.
- options - L2NetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the L2NetworksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L2Networks_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewL2NetworksClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "l2NetworkName", armnetworkcloud.L2Network{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.L2NetworkProperties{ HybridAksPluginType: to.Ptr(armnetworkcloud.HybridAksPluginTypeDPDK), InterfaceName: to.Ptr("eth0"), L2IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.L2Network = armnetworkcloud.L2Network{ // Name: to.Ptr("l2NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l2Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L2NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L2NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L2 network is up"), // InterfaceName: to.Ptr("eth0"), // L2IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L2NetworkProvisioningStateSucceeded), // }, // } }
Output:
func (*L2NetworksClient) BeginDelete ¶
func (client *L2NetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, l2NetworkName string, options *L2NetworksClientBeginDeleteOptions) (*runtime.Poller[L2NetworksClientDeleteResponse], error)
BeginDelete - Delete the provided layer 2 (L2) network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l2NetworkName - The name of the L2 network.
- options - L2NetworksClientBeginDeleteOptions contains the optional parameters for the L2NetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L2Networks_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewL2NetworksClient().BeginDelete(ctx, "resourceGroupName", "l2NetworkName", 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 (*L2NetworksClient) Get ¶
func (client *L2NetworksClient) Get(ctx context.Context, resourceGroupName string, l2NetworkName string, options *L2NetworksClientGetOptions) (L2NetworksClientGetResponse, error)
Get - Get properties of the provided layer 2 (L2) network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l2NetworkName - The name of the L2 network.
- options - L2NetworksClientGetOptions contains the optional parameters for the L2NetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L2Networks_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewL2NetworksClient().Get(ctx, "resourceGroupName", "l2NetworkName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.L2Network = armnetworkcloud.L2Network{ // Name: to.Ptr("l2NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l2Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L2NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L2NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L2 network is up"), // InterfaceName: to.Ptr("eth0"), // L2IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L2NetworkProvisioningStateSucceeded), // }, // } }
Output:
func (*L2NetworksClient) NewListByResourceGroupPager ¶
func (client *L2NetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *L2NetworksClientListByResourceGroupOptions) *runtime.Pager[L2NetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of layer 2 (L2) networks in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - L2NetworksClientListByResourceGroupOptions contains the optional parameters for the L2NetworksClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L2Networks_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewL2NetworksClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.L2NetworkList = armnetworkcloud.L2NetworkList{ // Value: []*armnetworkcloud.L2Network{ // { // Name: to.Ptr("l2NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l2Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L2NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L2NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L2 network is up"), // InterfaceName: to.Ptr("eth0"), // L2IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L2NetworkProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*L2NetworksClient) NewListBySubscriptionPager ¶
func (client *L2NetworksClient) NewListBySubscriptionPager(options *L2NetworksClientListBySubscriptionOptions) *runtime.Pager[L2NetworksClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of layer 2 (L2) networks in the provided subscription.
Generated from API version 2024-07-01
- options - L2NetworksClientListBySubscriptionOptions contains the optional parameters for the L2NetworksClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L2Networks_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewL2NetworksClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.L2NetworkList = armnetworkcloud.L2NetworkList{ // Value: []*armnetworkcloud.L2Network{ // { // Name: to.Ptr("l2NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l2Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L2NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L2NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L2 network is up"), // InterfaceName: to.Ptr("eth0"), // L2IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L2NetworkProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*L2NetworksClient) Update ¶
func (client *L2NetworksClient) Update(ctx context.Context, resourceGroupName string, l2NetworkName string, l2NetworkUpdateParameters L2NetworkPatchParameters, options *L2NetworksClientUpdateOptions) (L2NetworksClientUpdateResponse, error)
Update - Update tags associated with the provided layer 2 (L2) network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l2NetworkName - The name of the L2 network.
- l2NetworkUpdateParameters - The request body.
- options - L2NetworksClientUpdateOptions contains the optional parameters for the L2NetworksClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L2Networks_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewL2NetworksClient().Update(ctx, "resourceGroupName", "l2NetworkName", armnetworkcloud.L2NetworkPatchParameters{ Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.L2Network = armnetworkcloud.L2Network{ // Name: to.Ptr("l2NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l2Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L2NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L2NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L2 network is up"), // InterfaceName: to.Ptr("eth0"), // L2IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L2NetworkProvisioningStateSucceeded), // }, // } }
Output:
type L2NetworksClientBeginCreateOrUpdateOptions ¶
type L2NetworksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
L2NetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the L2NetworksClient.BeginCreateOrUpdate method.
type L2NetworksClientBeginDeleteOptions ¶
type L2NetworksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
L2NetworksClientBeginDeleteOptions contains the optional parameters for the L2NetworksClient.BeginDelete method.
type L2NetworksClientCreateOrUpdateResponse ¶
type L2NetworksClientCreateOrUpdateResponse struct { // L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. L2Network }
L2NetworksClientCreateOrUpdateResponse contains the response from method L2NetworksClient.BeginCreateOrUpdate.
type L2NetworksClientDeleteResponse ¶
type L2NetworksClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
L2NetworksClientDeleteResponse contains the response from method L2NetworksClient.BeginDelete.
type L2NetworksClientGetOptions ¶
type L2NetworksClientGetOptions struct { }
L2NetworksClientGetOptions contains the optional parameters for the L2NetworksClient.Get method.
type L2NetworksClientGetResponse ¶
type L2NetworksClientGetResponse struct { // L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. L2Network }
L2NetworksClientGetResponse contains the response from method L2NetworksClient.Get.
type L2NetworksClientListByResourceGroupOptions ¶
type L2NetworksClientListByResourceGroupOptions struct { }
L2NetworksClientListByResourceGroupOptions contains the optional parameters for the L2NetworksClient.NewListByResourceGroupPager method.
type L2NetworksClientListByResourceGroupResponse ¶
type L2NetworksClientListByResourceGroupResponse struct { // L2NetworkList represents a list of L2 networks. L2NetworkList }
L2NetworksClientListByResourceGroupResponse contains the response from method L2NetworksClient.NewListByResourceGroupPager.
type L2NetworksClientListBySubscriptionOptions ¶
type L2NetworksClientListBySubscriptionOptions struct { }
L2NetworksClientListBySubscriptionOptions contains the optional parameters for the L2NetworksClient.NewListBySubscriptionPager method.
type L2NetworksClientListBySubscriptionResponse ¶
type L2NetworksClientListBySubscriptionResponse struct { // L2NetworkList represents a list of L2 networks. L2NetworkList }
L2NetworksClientListBySubscriptionResponse contains the response from method L2NetworksClient.NewListBySubscriptionPager.
type L2NetworksClientUpdateOptions ¶
type L2NetworksClientUpdateOptions struct { }
L2NetworksClientUpdateOptions contains the optional parameters for the L2NetworksClient.Update method.
type L2NetworksClientUpdateResponse ¶
type L2NetworksClientUpdateResponse struct { // L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. L2Network }
L2NetworksClientUpdateResponse contains the response from method L2NetworksClient.Update.
type L2ServiceLoadBalancerConfiguration ¶ added in v1.2.0
type L2ServiceLoadBalancerConfiguration struct { // The list of pools of IP addresses that can be allocated to load balancer services. IPAddressPools []*IPAddressPool }
L2ServiceLoadBalancerConfiguration represents the configuration of a layer 2 service load balancer.
func (L2ServiceLoadBalancerConfiguration) MarshalJSON ¶ added in v1.2.0
func (l L2ServiceLoadBalancerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L2ServiceLoadBalancerConfiguration.
func (*L2ServiceLoadBalancerConfiguration) UnmarshalJSON ¶ added in v1.2.0
func (l *L2ServiceLoadBalancerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L2ServiceLoadBalancerConfiguration.
type L3Network ¶
type L3Network struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *L3NetworkProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources.
func (L3Network) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type L3Network.
func (*L3Network) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type L3Network.
type L3NetworkAttachmentConfiguration ¶ added in v0.2.0
type L3NetworkAttachmentConfiguration struct { // REQUIRED; The resource ID of the network that is being configured for attachment. NetworkID *string // The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. IpamEnabled *L3NetworkConfigurationIpamEnabled // The indicator of how this network will be utilized by the Kubernetes cluster. PluginType *KubernetesPluginType }
L3NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 3 network.
func (L3NetworkAttachmentConfiguration) MarshalJSON ¶ added in v0.2.0
func (l L3NetworkAttachmentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L3NetworkAttachmentConfiguration.
func (*L3NetworkAttachmentConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (l *L3NetworkAttachmentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L3NetworkAttachmentConfiguration.
type L3NetworkConfigurationIpamEnabled ¶ added in v0.2.0
type L3NetworkConfigurationIpamEnabled string
L3NetworkConfigurationIpamEnabled - The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached.
const ( L3NetworkConfigurationIpamEnabledFalse L3NetworkConfigurationIpamEnabled = "False" L3NetworkConfigurationIpamEnabledTrue L3NetworkConfigurationIpamEnabled = "True" )
func PossibleL3NetworkConfigurationIpamEnabledValues ¶ added in v0.2.0
func PossibleL3NetworkConfigurationIpamEnabledValues() []L3NetworkConfigurationIpamEnabled
PossibleL3NetworkConfigurationIpamEnabledValues returns the possible values for the L3NetworkConfigurationIpamEnabled const type.
type L3NetworkDetailedStatus ¶
type L3NetworkDetailedStatus string
L3NetworkDetailedStatus - The more detailed status of the L3 network.
const ( L3NetworkDetailedStatusAvailable L3NetworkDetailedStatus = "Available" L3NetworkDetailedStatusError L3NetworkDetailedStatus = "Error" L3NetworkDetailedStatusProvisioning L3NetworkDetailedStatus = "Provisioning" )
func PossibleL3NetworkDetailedStatusValues ¶
func PossibleL3NetworkDetailedStatusValues() []L3NetworkDetailedStatus
PossibleL3NetworkDetailedStatusValues returns the possible values for the L3NetworkDetailedStatus const type.
type L3NetworkList ¶
type L3NetworkList struct { // The link used to get the next page of operations. NextLink *string // The list of L3 networks. Value []*L3Network }
L3NetworkList represents a list of L3 networks.
func (L3NetworkList) MarshalJSON ¶
func (l L3NetworkList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L3NetworkList.
func (*L3NetworkList) UnmarshalJSON ¶
func (l *L3NetworkList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L3NetworkList.
type L3NetworkPatchParameters ¶
type L3NetworkPatchParameters struct { // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
L3NetworkPatchParameters represents the body of the request to patch the cloud services network.
func (L3NetworkPatchParameters) MarshalJSON ¶
func (l L3NetworkPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L3NetworkPatchParameters.
func (*L3NetworkPatchParameters) UnmarshalJSON ¶
func (l *L3NetworkPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L3NetworkPatchParameters.
type L3NetworkProperties ¶
type L3NetworkProperties struct { // REQUIRED; The resource ID of the Network Fabric l3IsolationDomain. L3IsolationDomainID *string // REQUIRED; The VLAN from the l3IsolationDomain that is used for this network. Vlan *int64 // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator // of whether or not to disable IPAM allocation on the network attachment // definition injected into the Hybrid AKS Cluster. HybridAksIpamEnabled *HybridAksIpamEnabled // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network // plugin type for Hybrid AKS. HybridAksPluginType *HybridAksPluginType // The type of the IP address allocation, defaulted to "DualStack". IPAllocationType *IPAllocationType // The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack. IPv4ConnectedPrefix *string // The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack. IPv6ConnectedPrefix *string // The default interface name for this L3 network in the virtual machine. This name can be overridden by the name supplied // in the network attachment configuration of that virtual machine. InterfaceName *string // READ-ONLY; The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. AssociatedResourceIDs []*string // READ-ONLY; The resource ID of the Network Cloud cluster this L3 network is associated with. ClusterID *string // READ-ONLY; The more detailed status of the L3 network. DetailedStatus *L3NetworkDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated // with this L3 network. HybridAksClustersAssociatedIDs []*string // READ-ONLY; The provisioning state of the L3 network. ProvisioningState *L3NetworkProvisioningState // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any // Hybrid AKS virtual machines, that are currently using this L3 network. VirtualMachinesAssociatedIDs []*string }
L3NetworkProperties represents properties of the L3 network.
func (L3NetworkProperties) MarshalJSON ¶
func (l L3NetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type L3NetworkProperties.
func (*L3NetworkProperties) UnmarshalJSON ¶
func (l *L3NetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type L3NetworkProperties.
type L3NetworkProvisioningState ¶
type L3NetworkProvisioningState string
L3NetworkProvisioningState - The provisioning state of the L3 network.
const ( L3NetworkProvisioningStateAccepted L3NetworkProvisioningState = "Accepted" L3NetworkProvisioningStateCanceled L3NetworkProvisioningState = "Canceled" L3NetworkProvisioningStateFailed L3NetworkProvisioningState = "Failed" L3NetworkProvisioningStateProvisioning L3NetworkProvisioningState = "Provisioning" L3NetworkProvisioningStateSucceeded L3NetworkProvisioningState = "Succeeded" )
func PossibleL3NetworkProvisioningStateValues ¶
func PossibleL3NetworkProvisioningStateValues() []L3NetworkProvisioningState
PossibleL3NetworkProvisioningStateValues returns the possible values for the L3NetworkProvisioningState const type.
type L3NetworksClient ¶
type L3NetworksClient struct {
// contains filtered or unexported fields
}
L3NetworksClient contains the methods for the L3Networks group. Don't use this type directly, use NewL3NetworksClient() instead.
func NewL3NetworksClient ¶
func NewL3NetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*L3NetworksClient, error)
NewL3NetworksClient creates a new instance of L3NetworksClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*L3NetworksClient) BeginCreateOrUpdate ¶
func (client *L3NetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, l3NetworkName string, l3NetworkParameters L3Network, options *L3NetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[L3NetworksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new layer 3 (L3) network or update the properties of the existing network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l3NetworkName - The name of the L3 network.
- l3NetworkParameters - The request body.
- options - L3NetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the L3NetworksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L3Networks_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewL3NetworksClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "l3NetworkName", armnetworkcloud.L3Network{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.L3NetworkProperties{ InterfaceName: to.Ptr("eth0"), IPAllocationType: to.Ptr(armnetworkcloud.IPAllocationTypeDualStack), IPv4ConnectedPrefix: to.Ptr("198.51.100.0/24"), IPv6ConnectedPrefix: to.Ptr("2001:db8::/64"), L3IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), Vlan: to.Ptr[int64](12), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.L3Network = armnetworkcloud.L3Network{ // Name: to.Ptr("l3NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l3Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L3NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L3NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L3 network is up"), // InterfaceName: to.Ptr("eth0"), // IPAllocationType: to.Ptr(armnetworkcloud.IPAllocationTypeDualStack), // IPv4ConnectedPrefix: to.Ptr("198.51.100.0/24"), // IPv6ConnectedPrefix: to.Ptr("2001:db8::/64"), // L3IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L3NetworkProvisioningStateSucceeded), // Vlan: to.Ptr[int64](12), // }, // } }
Output:
func (*L3NetworksClient) BeginDelete ¶
func (client *L3NetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, l3NetworkName string, options *L3NetworksClientBeginDeleteOptions) (*runtime.Poller[L3NetworksClientDeleteResponse], error)
BeginDelete - Delete the provided layer 3 (L3) network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l3NetworkName - The name of the L3 network.
- options - L3NetworksClientBeginDeleteOptions contains the optional parameters for the L3NetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L3Networks_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewL3NetworksClient().BeginDelete(ctx, "resourceGroupName", "l3NetworkName", 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 (*L3NetworksClient) Get ¶
func (client *L3NetworksClient) Get(ctx context.Context, resourceGroupName string, l3NetworkName string, options *L3NetworksClientGetOptions) (L3NetworksClientGetResponse, error)
Get - Get properties of the provided layer 3 (L3) network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l3NetworkName - The name of the L3 network.
- options - L3NetworksClientGetOptions contains the optional parameters for the L3NetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L3Networks_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewL3NetworksClient().Get(ctx, "resourceGroupName", "l3NetworkName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.L3Network = armnetworkcloud.L3Network{ // Name: to.Ptr("l3NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l3Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L3NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L3NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L3 network is up"), // InterfaceName: to.Ptr("eth0"), // IPAllocationType: to.Ptr(armnetworkcloud.IPAllocationTypeDualStack), // IPv4ConnectedPrefix: to.Ptr("198.51.100.0/24"), // IPv6ConnectedPrefix: to.Ptr("2001:db8::/64"), // L3IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L3NetworkProvisioningStateSucceeded), // Vlan: to.Ptr[int64](12), // }, // } }
Output:
func (*L3NetworksClient) NewListByResourceGroupPager ¶
func (client *L3NetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *L3NetworksClientListByResourceGroupOptions) *runtime.Pager[L3NetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of layer 3 (L3) networks in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - L3NetworksClientListByResourceGroupOptions contains the optional parameters for the L3NetworksClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L3Networks_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewL3NetworksClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.L3NetworkList = armnetworkcloud.L3NetworkList{ // Value: []*armnetworkcloud.L3Network{ // { // Name: to.Ptr("l3NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l3Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L3NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L3NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L3 network is up"), // InterfaceName: to.Ptr("eth0"), // IPAllocationType: to.Ptr(armnetworkcloud.IPAllocationTypeDualStack), // IPv4ConnectedPrefix: to.Ptr("198.51.100.0/24"), // IPv6ConnectedPrefix: to.Ptr("2001:db8::/64"), // L3IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L3NetworkProvisioningStateSucceeded), // Vlan: to.Ptr[int64](12), // }, // }}, // } } }
Output:
func (*L3NetworksClient) NewListBySubscriptionPager ¶
func (client *L3NetworksClient) NewListBySubscriptionPager(options *L3NetworksClientListBySubscriptionOptions) *runtime.Pager[L3NetworksClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of layer 3 (L3) networks in the provided subscription.
Generated from API version 2024-07-01
- options - L3NetworksClientListBySubscriptionOptions contains the optional parameters for the L3NetworksClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L3Networks_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewL3NetworksClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.L3NetworkList = armnetworkcloud.L3NetworkList{ // Value: []*armnetworkcloud.L3Network{ // { // Name: to.Ptr("l3NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l3Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L3NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L3NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L3 network is up"), // InterfaceName: to.Ptr("eth0"), // IPAllocationType: to.Ptr(armnetworkcloud.IPAllocationTypeDualStack), // IPv4ConnectedPrefix: to.Ptr("198.51.100.0/24"), // IPv6ConnectedPrefix: to.Ptr("2001:db8::/64"), // L3IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L3NetworkProvisioningStateSucceeded), // Vlan: to.Ptr[int64](12), // }, // }}, // } } }
Output:
func (*L3NetworksClient) Update ¶
func (client *L3NetworksClient) Update(ctx context.Context, resourceGroupName string, l3NetworkName string, l3NetworkUpdateParameters L3NetworkPatchParameters, options *L3NetworksClientUpdateOptions) (L3NetworksClientUpdateResponse, error)
Update - Update tags associated with the provided layer 3 (L3) network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- l3NetworkName - The name of the L3 network.
- l3NetworkUpdateParameters - The request body.
- options - L3NetworksClientUpdateOptions contains the optional parameters for the L3NetworksClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/L3Networks_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewL3NetworksClient().Update(ctx, "resourceGroupName", "l3NetworkName", armnetworkcloud.L3NetworkPatchParameters{ Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.L3Network = armnetworkcloud.L3Network{ // Name: to.Ptr("l3NetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/l3Networks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.L3NetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.L3NetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("L3 network is up"), // InterfaceName: to.Ptr("eth0"), // IPAllocationType: to.Ptr(armnetworkcloud.IPAllocationTypeDualStack), // IPv4ConnectedPrefix: to.Ptr("198.51.100.0/24"), // IPv6ConnectedPrefix: to.Ptr("2001:db8::/64"), // L3IsolationDomainID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), // ProvisioningState: to.Ptr(armnetworkcloud.L3NetworkProvisioningStateSucceeded), // Vlan: to.Ptr[int64](12), // }, // } }
Output:
type L3NetworksClientBeginCreateOrUpdateOptions ¶
type L3NetworksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
L3NetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the L3NetworksClient.BeginCreateOrUpdate method.
type L3NetworksClientBeginDeleteOptions ¶
type L3NetworksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
L3NetworksClientBeginDeleteOptions contains the optional parameters for the L3NetworksClient.BeginDelete method.
type L3NetworksClientCreateOrUpdateResponse ¶
type L3NetworksClientCreateOrUpdateResponse struct { // L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. L3Network }
L3NetworksClientCreateOrUpdateResponse contains the response from method L3NetworksClient.BeginCreateOrUpdate.
type L3NetworksClientDeleteResponse ¶
type L3NetworksClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
L3NetworksClientDeleteResponse contains the response from method L3NetworksClient.BeginDelete.
type L3NetworksClientGetOptions ¶
type L3NetworksClientGetOptions struct { }
L3NetworksClientGetOptions contains the optional parameters for the L3NetworksClient.Get method.
type L3NetworksClientGetResponse ¶
type L3NetworksClientGetResponse struct { // L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. L3Network }
L3NetworksClientGetResponse contains the response from method L3NetworksClient.Get.
type L3NetworksClientListByResourceGroupOptions ¶
type L3NetworksClientListByResourceGroupOptions struct { }
L3NetworksClientListByResourceGroupOptions contains the optional parameters for the L3NetworksClient.NewListByResourceGroupPager method.
type L3NetworksClientListByResourceGroupResponse ¶
type L3NetworksClientListByResourceGroupResponse struct { // L3NetworkList represents a list of L3 networks. L3NetworkList }
L3NetworksClientListByResourceGroupResponse contains the response from method L3NetworksClient.NewListByResourceGroupPager.
type L3NetworksClientListBySubscriptionOptions ¶
type L3NetworksClientListBySubscriptionOptions struct { }
L3NetworksClientListBySubscriptionOptions contains the optional parameters for the L3NetworksClient.NewListBySubscriptionPager method.
type L3NetworksClientListBySubscriptionResponse ¶
type L3NetworksClientListBySubscriptionResponse struct { // L3NetworkList represents a list of L3 networks. L3NetworkList }
L3NetworksClientListBySubscriptionResponse contains the response from method L3NetworksClient.NewListBySubscriptionPager.
type L3NetworksClientUpdateOptions ¶
type L3NetworksClientUpdateOptions struct { }
L3NetworksClientUpdateOptions contains the optional parameters for the L3NetworksClient.Update method.
type L3NetworksClientUpdateResponse ¶
type L3NetworksClientUpdateResponse struct { // L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. L3Network }
L3NetworksClientUpdateResponse contains the response from method L3NetworksClient.Update.
type LldpNeighbor ¶
type LldpNeighbor struct { // READ-ONLY; The descriptive information about the port on the connected device. PortDescription *string // READ-ONLY; The system-assigned name of the port on the connected device. PortName *string // READ-ONLY; The descriptive information about the connected device. SystemDescription *string // READ-ONLY; The system-assigned name of the connected device. SystemName *string }
LldpNeighbor - Type Deprecated. Will be removed in an upcoming version. LldpNeighbor represents the details about the device connected to the NIC.
func (LldpNeighbor) MarshalJSON ¶
func (l LldpNeighbor) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LldpNeighbor.
func (*LldpNeighbor) UnmarshalJSON ¶
func (l *LldpNeighbor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LldpNeighbor.
type MachineDisk ¶
type MachineDisk struct { // READ-ONLY; The maximum amount of storage. Measured in gibibytes. CapacityGB *int64 // READ-ONLY; The connection type of the rack SKU resource. Connection *MachineSKUDiskConnectionType // READ-ONLY; The disk type of rack SKU resource. Type *DiskType }
MachineDisk - Disk represents the properties of the disk.
func (MachineDisk) MarshalJSON ¶
func (m MachineDisk) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineDisk.
func (*MachineDisk) UnmarshalJSON ¶
func (m *MachineDisk) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineDisk.
type MachineSKUDiskConnectionType ¶
type MachineSKUDiskConnectionType string
MachineSKUDiskConnectionType - The connection type of the rack SKU resource.
const ( MachineSKUDiskConnectionTypePCIE MachineSKUDiskConnectionType = "PCIE" MachineSKUDiskConnectionTypeRAID MachineSKUDiskConnectionType = "RAID" MachineSKUDiskConnectionTypeSAS MachineSKUDiskConnectionType = "SAS" MachineSKUDiskConnectionTypeSATA MachineSKUDiskConnectionType = "SATA" )
func PossibleMachineSKUDiskConnectionTypeValues ¶
func PossibleMachineSKUDiskConnectionTypeValues() []MachineSKUDiskConnectionType
PossibleMachineSKUDiskConnectionTypeValues returns the possible values for the MachineSKUDiskConnectionType const type.
type MachineSKUProperties ¶
type MachineSKUProperties struct { // READ-ONLY; The type of bootstrap protocol used. BootstrapProtocol *BootstrapProtocol // READ-ONLY; The count of CPU cores for this machine. CPUCores *int64 // READ-ONLY; The count of CPU sockets for this machine. CPUSockets *int64 // READ-ONLY; The list of disks. Disks []*MachineDisk // READ-ONLY; The generation of the architecture. Generation *string // READ-ONLY; The hardware version of the machine. HardwareVersion *string // READ-ONLY; The maximum amount of memory. Measured in gibibytes. MemoryCapacityGB *int64 // READ-ONLY; The model of the machine. Model *string // READ-ONLY; The list of network interfaces. NetworkInterfaces []*NetworkInterface // READ-ONLY; The count of SMT and physical core threads for this machine. TotalThreads *int64 // READ-ONLY; The make of the machine. Vendor *string }
MachineSKUProperties - MachineSkuProperties represents the properties of the machine SKU.
func (MachineSKUProperties) MarshalJSON ¶
func (m MachineSKUProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineSKUProperties.
func (*MachineSKUProperties) UnmarshalJSON ¶
func (m *MachineSKUProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineSKUProperties.
type MachineSKUSlot ¶
type MachineSKUSlot struct { // The list of the resource properties. Properties *MachineSKUProperties // READ-ONLY; The position in the rack for the machine. RackSlot *int64 }
MachineSKUSlot - MachineSkuSlot represents a single SKU and rack slot associated with the machine.
func (MachineSKUSlot) MarshalJSON ¶
func (m MachineSKUSlot) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MachineSKUSlot.
func (*MachineSKUSlot) UnmarshalJSON ¶
func (m *MachineSKUSlot) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MachineSKUSlot.
type ManagedResourceGroupConfiguration ¶
type ManagedResourceGroupConfiguration struct { // The location of the managed resource group. If not specified, the location of the parent resource is chosen. Location *string // The name for the managed resource group. If not specified, the unique name is automatically generated. Name *string }
ManagedResourceGroupConfiguration represents the configuration of the resource group managed by Azure.
func (ManagedResourceGroupConfiguration) MarshalJSON ¶
func (m ManagedResourceGroupConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedResourceGroupConfiguration.
func (*ManagedResourceGroupConfiguration) UnmarshalJSON ¶
func (m *ManagedResourceGroupConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedResourceGroupConfiguration.
type ManagedServiceIdentity ¶ added in v1.2.0
type ManagedServiceIdentity struct { // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Type *ManagedServiceIdentityType // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM // resource ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. // The dictionary values can be empty objects ({}) in // requests. UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned // identity. PrincipalID *string // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. TenantID *string }
ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
func (ManagedServiceIdentity) MarshalJSON ¶ added in v1.2.0
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (*ManagedServiceIdentity) UnmarshalJSON ¶ added in v1.2.0
func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.
type ManagedServiceIdentitySelectorType ¶ added in v1.2.0
type ManagedServiceIdentitySelectorType string
ManagedServiceIdentitySelectorType - The type of managed identity that is being selected.
const ( ManagedServiceIdentitySelectorTypeSystemAssignedIdentity ManagedServiceIdentitySelectorType = "SystemAssignedIdentity" ManagedServiceIdentitySelectorTypeUserAssignedIdentity ManagedServiceIdentitySelectorType = "UserAssignedIdentity" )
func PossibleManagedServiceIdentitySelectorTypeValues ¶ added in v1.2.0
func PossibleManagedServiceIdentitySelectorTypeValues() []ManagedServiceIdentitySelectorType
PossibleManagedServiceIdentitySelectorTypeValues returns the possible values for the ManagedServiceIdentitySelectorType const type.
type ManagedServiceIdentityType ¶ added in v1.2.0
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
const ( ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶ added in v1.2.0
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type MetricsConfigurationsClient ¶
type MetricsConfigurationsClient struct {
// contains filtered or unexported fields
}
MetricsConfigurationsClient contains the methods for the MetricsConfigurations group. Don't use this type directly, use NewMetricsConfigurationsClient() instead.
func NewMetricsConfigurationsClient ¶
func NewMetricsConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MetricsConfigurationsClient, error)
NewMetricsConfigurationsClient creates a new instance of MetricsConfigurationsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MetricsConfigurationsClient) BeginCreateOrUpdate ¶
func (client *MetricsConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, metricsConfigurationParameters ClusterMetricsConfiguration, options *MetricsConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MetricsConfigurationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create new or update the existing metrics configuration of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- metricsConfigurationName - The name of the metrics configuration for the cluster.
- metricsConfigurationParameters - The request body.
- options - MetricsConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the MetricsConfigurationsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterMetricsConfigurations_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMetricsConfigurationsClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "clusterName", "default", armnetworkcloud.ClusterMetricsConfiguration{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.ClusterMetricsConfigurationProperties{ CollectionInterval: to.Ptr[int64](15), EnabledMetrics: []*string{ to.Ptr("metric1"), to.Ptr("metric2")}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterMetricsConfiguration = armnetworkcloud.ClusterMetricsConfiguration{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/metricsConfigurations"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ClusterMetricsConfigurationProperties{ // CollectionInterval: to.Ptr[int64](15), // DetailedStatus: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationDetailedStatusApplied), // DetailedStatusMessage: to.Ptr("Metrics configuration has been successfully applied to all resources."), // DisabledMetrics: []*string{ // to.Ptr("metric3"), // to.Ptr("metric4")}, // EnabledMetrics: []*string{ // to.Ptr("metric1"), // to.Ptr("metric2")}, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationProvisioningStateSucceeded), // }, // } }
Output:
func (*MetricsConfigurationsClient) BeginDelete ¶
func (client *MetricsConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, options *MetricsConfigurationsClientBeginDeleteOptions) (*runtime.Poller[MetricsConfigurationsClientDeleteResponse], error)
BeginDelete - Delete the metrics configuration of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- metricsConfigurationName - The name of the metrics configuration for the cluster.
- options - MetricsConfigurationsClientBeginDeleteOptions contains the optional parameters for the MetricsConfigurationsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterMetricsConfigurations_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMetricsConfigurationsClient().BeginDelete(ctx, "resourceGroupName", "clusterName", "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 (*MetricsConfigurationsClient) BeginUpdate ¶
func (client *MetricsConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, metricsConfigurationUpdateParameters ClusterMetricsConfigurationPatchParameters, options *MetricsConfigurationsClientBeginUpdateOptions) (*runtime.Poller[MetricsConfigurationsClientUpdateResponse], error)
BeginUpdate - Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- metricsConfigurationName - The name of the metrics configuration for the cluster.
- metricsConfigurationUpdateParameters - The request body.
- options - MetricsConfigurationsClientBeginUpdateOptions contains the optional parameters for the MetricsConfigurationsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterMetricsConfigurations_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMetricsConfigurationsClient().BeginUpdate(ctx, "resourceGroupName", "clusterName", "default", armnetworkcloud.ClusterMetricsConfigurationPatchParameters{ Properties: &armnetworkcloud.ClusterMetricsConfigurationPatchProperties{ CollectionInterval: to.Ptr[int64](15), EnabledMetrics: []*string{ to.Ptr("metric1"), to.Ptr("metric2")}, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterMetricsConfiguration = armnetworkcloud.ClusterMetricsConfiguration{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/metricsConfigurations"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ClusterMetricsConfigurationProperties{ // CollectionInterval: to.Ptr[int64](15), // DetailedStatus: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationDetailedStatusApplied), // DetailedStatusMessage: to.Ptr("Metrics configuration has been successfully applied to all resources."), // DisabledMetrics: []*string{ // to.Ptr("metric3"), // to.Ptr("metric4")}, // EnabledMetrics: []*string{ // to.Ptr("metric1"), // to.Ptr("metric2")}, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationProvisioningStateSucceeded), // }, // } }
Output:
func (*MetricsConfigurationsClient) Get ¶
func (client *MetricsConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, metricsConfigurationName string, options *MetricsConfigurationsClientGetOptions) (MetricsConfigurationsClientGetResponse, error)
Get - Get metrics configuration of the provided cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- metricsConfigurationName - The name of the metrics configuration for the cluster.
- options - MetricsConfigurationsClientGetOptions contains the optional parameters for the MetricsConfigurationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterMetricsConfigurations_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMetricsConfigurationsClient().Get(ctx, "resourceGroupName", "clusterName", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterMetricsConfiguration = armnetworkcloud.ClusterMetricsConfiguration{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/metricsConfigurations"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ClusterMetricsConfigurationProperties{ // CollectionInterval: to.Ptr[int64](15), // DetailedStatus: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationDetailedStatusApplied), // DetailedStatusMessage: to.Ptr("Metrics configuration has been successfully applied to all resources."), // DisabledMetrics: []*string{ // to.Ptr("metric3"), // to.Ptr("metric4")}, // EnabledMetrics: []*string{ // to.Ptr("metric1"), // to.Ptr("metric2")}, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationProvisioningStateSucceeded), // }, // } }
Output:
func (*MetricsConfigurationsClient) NewListByClusterPager ¶ added in v0.2.0
func (client *MetricsConfigurationsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *MetricsConfigurationsClientListByClusterOptions) *runtime.Pager[MetricsConfigurationsClientListByClusterResponse]
NewListByClusterPager - Get a list of metrics configurations for the provided cluster.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - MetricsConfigurationsClientListByClusterOptions contains the optional parameters for the MetricsConfigurationsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/ClusterMetricsConfigurations_ListByCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMetricsConfigurationsClient().NewListByClusterPager("resourceGroupName", "clusterName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterMetricsConfigurationList = armnetworkcloud.ClusterMetricsConfigurationList{ // Value: []*armnetworkcloud.ClusterMetricsConfiguration{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.NetworkCloud/clusters/metricsConfigurations"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName/metricsConfigurations/default"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.ClusterMetricsConfigurationProperties{ // CollectionInterval: to.Ptr[int64](15), // DetailedStatus: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationDetailedStatusApplied), // DetailedStatusMessage: to.Ptr("Metrics configuration has been successfully applied to all resources."), // DisabledMetrics: []*string{ // to.Ptr("metric3"), // to.Ptr("metric4")}, // EnabledMetrics: []*string{ // to.Ptr("metric1"), // to.Ptr("metric2")}, // ProvisioningState: to.Ptr(armnetworkcloud.ClusterMetricsConfigurationProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type MetricsConfigurationsClientBeginCreateOrUpdateOptions ¶
type MetricsConfigurationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MetricsConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the MetricsConfigurationsClient.BeginCreateOrUpdate method.
type MetricsConfigurationsClientBeginDeleteOptions ¶
type MetricsConfigurationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MetricsConfigurationsClientBeginDeleteOptions contains the optional parameters for the MetricsConfigurationsClient.BeginDelete method.
type MetricsConfigurationsClientBeginUpdateOptions ¶
type MetricsConfigurationsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MetricsConfigurationsClientBeginUpdateOptions contains the optional parameters for the MetricsConfigurationsClient.BeginUpdate method.
type MetricsConfigurationsClientCreateOrUpdateResponse ¶
type MetricsConfigurationsClientCreateOrUpdateResponse struct { // ClusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. ClusterMetricsConfiguration }
MetricsConfigurationsClientCreateOrUpdateResponse contains the response from method MetricsConfigurationsClient.BeginCreateOrUpdate.
type MetricsConfigurationsClientDeleteResponse ¶
type MetricsConfigurationsClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
MetricsConfigurationsClientDeleteResponse contains the response from method MetricsConfigurationsClient.BeginDelete.
type MetricsConfigurationsClientGetOptions ¶
type MetricsConfigurationsClientGetOptions struct { }
MetricsConfigurationsClientGetOptions contains the optional parameters for the MetricsConfigurationsClient.Get method.
type MetricsConfigurationsClientGetResponse ¶
type MetricsConfigurationsClientGetResponse struct { // ClusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. ClusterMetricsConfiguration }
MetricsConfigurationsClientGetResponse contains the response from method MetricsConfigurationsClient.Get.
type MetricsConfigurationsClientListByClusterOptions ¶ added in v0.2.0
type MetricsConfigurationsClientListByClusterOptions struct { }
MetricsConfigurationsClientListByClusterOptions contains the optional parameters for the MetricsConfigurationsClient.NewListByClusterPager method.
type MetricsConfigurationsClientListByClusterResponse ¶ added in v0.2.0
type MetricsConfigurationsClientListByClusterResponse struct { // ClusterMetricsConfigurationList represents a list of metrics configuration of the cluster. ClusterMetricsConfigurationList }
MetricsConfigurationsClientListByClusterResponse contains the response from method MetricsConfigurationsClient.NewListByClusterPager.
type MetricsConfigurationsClientUpdateResponse ¶
type MetricsConfigurationsClientUpdateResponse struct { // ClusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. ClusterMetricsConfiguration }
MetricsConfigurationsClientUpdateResponse contains the response from method MetricsConfigurationsClient.BeginUpdate.
type NetworkAttachment ¶
type NetworkAttachment struct { // REQUIRED; The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, // l3Network, l2Network or trunkedNetwork resources. AttachedNetworkID *string // REQUIRED; The IP allocation mechanism for the virtual machine. Dynamic and Static are only valid for l3Network which may // also specify Disabled. Otherwise, Disabled is the only permitted value. IPAllocationMethod *VirtualMachineIPAllocationMethod // The indicator of whether this is the default gateway. Only one of the attached networks (including the CloudServicesNetwork // attachment) for a single machine may be specified as True. DefaultGateway *DefaultGateway // The IPv4 address of the virtual machine. // This field is used only if the attached network has IPAllocationType of IPV4 or DualStack. // If IPAllocationMethod is: Static - this field must contain a user specified IPv4 address from within the subnet specified // in the attached network. Dynamic - this field is read-only, but will be // populated with an address from within the subnet specified in the attached network. Disabled - this field will be empty. IPv4Address *string // The IPv6 address of the virtual machine. // This field is used only if the attached network has IPAllocationType of IPV6 or DualStack. // If IPAllocationMethod is: Static - this field must contain an IPv6 address range from within the range specified in the // attached network. Dynamic - this field is read-only, but will be populated with // an range from within the subnet specified in the attached network. Disabled - this field will be empty. IPv6Address *string // The associated network's interface name. If specified, the network attachment name has a maximum length of 15 characters // and must be unique to this virtual machine. If the user doesn’t specify this // value, the default interface name of the network resource will be used. For a CloudServicesNetwork resource, this name // will be ignored. NetworkAttachmentName *string // READ-ONLY; The MAC address of the interface for the virtual machine that corresponds to this network attachment. MacAddress *string }
NetworkAttachment represents the single network attachment.
func (NetworkAttachment) MarshalJSON ¶
func (n NetworkAttachment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkAttachment.
func (*NetworkAttachment) UnmarshalJSON ¶
func (n *NetworkAttachment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkAttachment.
type NetworkConfiguration ¶ added in v0.2.0
type NetworkConfiguration struct { // REQUIRED; The resource ID of the associated Cloud Services network. CloudServicesNetworkID *string // REQUIRED; The resource ID of the Layer 3 network that is used for creation of the Container Networking Interface network. CniNetworkID *string // The configuration of networks being attached to the cluster for use by the workloads that run on this Kubernetes cluster. AttachedNetworkConfiguration *AttachedNetworkConfiguration // The configuration of the BGP service load balancer for this Kubernetes cluster. A maximum of one service load balancer // may be specified, either Layer 2 or BGP. BgpServiceLoadBalancerConfiguration *BgpServiceLoadBalancerConfiguration // The IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified // in service CIDR. DNSServiceIP *string // The configuration of the Layer 2 service load balancer for this Kubernetes cluster. A maximum of one service load balancer // may be specified, either Layer 2 or BGP. L2ServiceLoadBalancerConfiguration *L2ServiceLoadBalancerConfiguration // The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, // one for each IP family (IPv4/IPv6), is expected for dual-stack networking. PodCidrs []*string // The CIDR notation IP ranges from which to assign service IPs. One IPv4 CIDR is expected for single-stack networking. Two // CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack // networking. ServiceCidrs []*string }
NetworkConfiguration specifies the Kubernetes cluster network related configuration.
func (NetworkConfiguration) MarshalJSON ¶ added in v0.2.0
func (n NetworkConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkConfiguration.
func (*NetworkConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (n *NetworkConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConfiguration.
type NetworkInterface ¶
type NetworkInterface struct { // READ-ONLY; The partial address of Peripheral Component Interconnect (PCI). Address *string // READ-ONLY; The connection type of the device. DeviceConnectionType *DeviceConnectionType // READ-ONLY; The model name of the device. Model *string // READ-ONLY; The physical slot for this device. PhysicalSlot *int64 // READ-ONLY; The number of ports on the device. PortCount *int64 // READ-ONLY; The maximum amount of data in gigabits that the line card transmits through a port at any given second. PortSpeed *int64 // READ-ONLY; The vendor name of the device. Vendor *string }
NetworkInterface represents properties of the network interface.
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 Nic ¶
type Nic struct { // READ-ONLY; The information about the device connected to this NIC. LldpNeighbor *LldpNeighbor // READ-ONLY; The MAC address associated with this NIC. MacAddress *string // READ-ONLY; The name of the NIC/interface. Name *string }
Nic - Type Deprecated. Will be removed in an upcoming version. Nic represents the network interface card details.
func (Nic) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Nic.
func (*Nic) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Nic.
type NodePoolAdministratorConfigurationPatch ¶ added in v1.2.0
type NodePoolAdministratorConfigurationPatch struct { // SshPublicKey represents the public key used to authenticate with a resource through SSH. SSHPublicKeys []*SSHPublicKey }
NodePoolAdministratorConfigurationPatch represents the patching capabilities for the administrator configuration.
func (NodePoolAdministratorConfigurationPatch) MarshalJSON ¶ added in v1.2.0
func (n NodePoolAdministratorConfigurationPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NodePoolAdministratorConfigurationPatch.
func (*NodePoolAdministratorConfigurationPatch) UnmarshalJSON ¶ added in v1.2.0
func (n *NodePoolAdministratorConfigurationPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NodePoolAdministratorConfigurationPatch.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationStatusResult ¶ added in v1.0.0
type OperationStatusResult struct { // REQUIRED; Operation status. Status *string // The additional properties of the operation status result. Properties *OperationStatusResultProperties // READ-ONLY; The end time of the operation. EndTime *time.Time // READ-ONLY; If present, details of the operation error. Error *ErrorDetail // READ-ONLY; Fully qualified ID for the async operation. ID *string // READ-ONLY; Name of the async operation. Name *string // READ-ONLY; The operations list. Operations []*OperationStatusResult // READ-ONLY; Percent of the operation that is complete. PercentComplete *float32 // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. ResourceID *string // READ-ONLY; The start time of the operation. StartTime *time.Time }
OperationStatusResult - The current status of an async operation.
func (OperationStatusResult) MarshalJSON ¶ added in v1.0.0
func (o OperationStatusResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.
func (*OperationStatusResult) UnmarshalJSON ¶ added in v1.0.0
func (o *OperationStatusResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.
type OperationStatusResultProperties ¶ added in v1.2.0
type OperationStatusResultProperties struct { // READ-ONLY; For actions that run commands or scripts, the exit code of the script execution. ExitCode *string // READ-ONLY; For actions that run commands or scripts, the leading bytes of the output of the script execution. OutputHead *string // READ-ONLY; For actions that run commands or scripts, a reference to the location of the result. ResultRef *string // READ-ONLY; For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. ResultURL *string }
OperationStatusResultProperties represents additional properties of the operation status result.
func (OperationStatusResultProperties) MarshalJSON ¶ added in v1.2.0
func (o OperationStatusResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationStatusResultProperties.
func (*OperationStatusResultProperties) UnmarshalJSON ¶ added in v1.2.0
func (o *OperationStatusResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResultProperties.
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 - Get a list of all available resource provider operations. It contains a URL link to get the next set of results.
Generated from API version 2024-07-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Operations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armnetworkcloud.OperationListResult{ // Value: []*armnetworkcloud.Operation{ // { // Name: to.Ptr("Microsoft.NetworkCloud/clusters/Read"), // ActionType: to.Ptr(armnetworkcloud.ActionTypeInternal), // Display: &armnetworkcloud.OperationDisplay{ // Description: to.Ptr("Reads Network Cloud cluster(s)"), // Operation: to.Ptr("Get/list Network Cloud cluster resources"), // Provider: to.Ptr("Microsoft Network Cloud"), // Resource: to.Ptr("Network Cloud cluster"), // }, // IsDataAction: to.Ptr(true), // Origin: to.Ptr(armnetworkcloud.OriginUserSystem), // }, // { // Name: to.Ptr("Microsoft.NetworkCloud/clusters/Write"), // ActionType: to.Ptr(armnetworkcloud.ActionTypeInternal), // Display: &armnetworkcloud.OperationDisplay{ // Description: to.Ptr("Writes Network Cloud cluster(s)"), // Operation: to.Ptr("Create/update Network Cloud cluster resources"), // Provider: to.Ptr("Microsoft Network Cloud"), // Resource: to.Ptr("Network Cloud cluster"), // }, // IsDataAction: to.Ptr(true), // Origin: to.Ptr(armnetworkcloud.OriginUserSystem), // }}, // } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type OsDisk ¶
type OsDisk struct { // REQUIRED; The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. DiskSizeGB *int64 // The strategy for creating the OS disk. CreateOption *OsDiskCreateOption // The strategy for deleting the OS disk. DeleteOption *OsDiskDeleteOption }
OsDisk represents configuration of the boot disk.
func (OsDisk) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type OsDisk.
func (*OsDisk) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type OsDisk.
type OsDiskCreateOption ¶
type OsDiskCreateOption string
OsDiskCreateOption - The strategy for creating the OS disk.
const (
OsDiskCreateOptionEphemeral OsDiskCreateOption = "Ephemeral"
)
func PossibleOsDiskCreateOptionValues ¶
func PossibleOsDiskCreateOptionValues() []OsDiskCreateOption
PossibleOsDiskCreateOptionValues returns the possible values for the OsDiskCreateOption const type.
type OsDiskDeleteOption ¶
type OsDiskDeleteOption string
OsDiskDeleteOption - The strategy for deleting the OS disk.
const (
OsDiskDeleteOptionDelete OsDiskDeleteOption = "Delete"
)
func PossibleOsDiskDeleteOptionValues ¶
func PossibleOsDiskDeleteOptionValues() []OsDiskDeleteOption
PossibleOsDiskDeleteOptionValues returns the possible values for the OsDiskDeleteOption const type.
type Rack ¶
type Rack struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *RackProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Rack represents the hardware of the rack and is dependent upon the cluster for lifecycle.
func (Rack) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Rack.
func (*Rack) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Rack.
type RackDefinition ¶
type RackDefinition struct { // REQUIRED; The resource ID of the network rack that matches this rack definition. NetworkRackID *string // REQUIRED; The resource ID of the sku for the rack being added. RackSKUID *string // REQUIRED; The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other // than a serial number may be provided if desired. RackSerialNumber *string // The zone name used for this rack when created. Availability zones are used for workload placement. AvailabilityZone *string // The unordered list of bare metal machine configuration. BareMetalMachineConfigurationData []*BareMetalMachineConfigurationData // The free-form description of the rack's location. RackLocation *string // The list of storage appliance configuration data for this rack. StorageApplianceConfigurationData []*StorageApplianceConfigurationData }
RackDefinition represents details regarding the rack.
func (RackDefinition) MarshalJSON ¶
func (r RackDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RackDefinition.
func (*RackDefinition) UnmarshalJSON ¶
func (r *RackDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RackDefinition.
type RackDetailedStatus ¶
type RackDetailedStatus string
RackDetailedStatus - The more detailed status of the rack.
const ( RackDetailedStatusAvailable RackDetailedStatus = "Available" RackDetailedStatusError RackDetailedStatus = "Error" RackDetailedStatusProvisioning RackDetailedStatus = "Provisioning" )
func PossibleRackDetailedStatusValues ¶
func PossibleRackDetailedStatusValues() []RackDetailedStatus
PossibleRackDetailedStatusValues returns the possible values for the RackDetailedStatus const type.
type RackList ¶
type RackList struct { // The link used to get the next page of operations. NextLink *string // The list of racks. Value []*Rack }
RackList represents a list of racks.
func (RackList) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type RackList.
func (*RackList) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type RackList.
type RackPatchParameters ¶
type RackPatchParameters struct { // The list of the resource properties. Properties *RacksPatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
RackPatchParameters represents the body of the request to patch the rack properties.
func (RackPatchParameters) MarshalJSON ¶
func (r RackPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RackPatchParameters.
func (*RackPatchParameters) UnmarshalJSON ¶
func (r *RackPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RackPatchParameters.
type RackProperties ¶
type RackProperties struct { // REQUIRED; The value that will be used for machines in this rack to represent the availability zones that can be referenced // by Hybrid AKS Clusters for node arrangement. AvailabilityZone *string // REQUIRED; The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle 9, Rack 2B”) RackLocation *string // REQUIRED; The SKU for the rack. RackSKUID *string // REQUIRED; The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other // than a serial number may be provided if desired. RackSerialNumber *string // READ-ONLY; The resource ID of the cluster the rack is created for. This value is set when the rack is created by the cluster. ClusterID *string // READ-ONLY; The more detailed status of the rack. DetailedStatus *RackDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The provisioning state of the rack resource. ProvisioningState *RackProvisioningState }
RackProperties represents the properties of the rack.
func (RackProperties) MarshalJSON ¶
func (r RackProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RackProperties.
func (*RackProperties) UnmarshalJSON ¶
func (r *RackProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RackProperties.
type RackProvisioningState ¶
type RackProvisioningState string
RackProvisioningState - The provisioning state of the rack resource.
const ( RackProvisioningStateAccepted RackProvisioningState = "Accepted" RackProvisioningStateCanceled RackProvisioningState = "Canceled" RackProvisioningStateFailed RackProvisioningState = "Failed" RackProvisioningStateProvisioning RackProvisioningState = "Provisioning" RackProvisioningStateSucceeded RackProvisioningState = "Succeeded" )
func PossibleRackProvisioningStateValues ¶
func PossibleRackProvisioningStateValues() []RackProvisioningState
PossibleRackProvisioningStateValues returns the possible values for the RackProvisioningState const type.
type RackSKU ¶
type RackSKU struct { // REQUIRED; The list of the resource properties. Properties *RackSKUProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
RackSKU - RackSku represents the SKU information of the rack.
func (RackSKU) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type RackSKU.
func (*RackSKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type RackSKU.
type RackSKUList ¶
type RackSKUList struct { // The link used to get the next page of operations. NextLink *string // The list of Rack SKUs. Value []*RackSKU }
RackSKUList - RackSkuList represents a list of rack SKUs.
func (RackSKUList) MarshalJSON ¶
func (r RackSKUList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RackSKUList.
func (*RackSKUList) UnmarshalJSON ¶
func (r *RackSKUList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RackSKUList.
type RackSKUProperties ¶
type RackSKUProperties struct { // READ-ONLY; The list of machine SKUs and associated rack slot for the compute-dedicated machines in this rack model. ComputeMachines []*MachineSKUSlot // READ-ONLY; The list of machine SKUs and associated rack slot for the control-plane dedicated machines in this rack model. ControllerMachines []*MachineSKUSlot // READ-ONLY; The free-form text describing the rack. Description *string // READ-ONLY; The maximum number of compute racks supported by an aggregator rack. 0 if this is a compute rack or a rack for // a single rack cluster(rackType="Single"). MaxClusterSlots *int64 // READ-ONLY; The provisioning state of the rack SKU resource. ProvisioningState *RackSKUProvisioningState // READ-ONLY; The type of the rack. RackType *RackSKUType // READ-ONLY; The list of appliance SKUs and associated rack slot for the storage appliance(s) in this rack model. StorageAppliances []*StorageApplianceSKUSlot // READ-ONLY; The list of supported SKUs if the rack is an aggregator. SupportedRackSKUIDs []*string }
RackSKUProperties - RackSkuProperties represents the properties of compute-related hardware for a rack. This supports both aggregator and compute racks.
func (RackSKUProperties) MarshalJSON ¶
func (r RackSKUProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RackSKUProperties.
func (*RackSKUProperties) UnmarshalJSON ¶
func (r *RackSKUProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RackSKUProperties.
type RackSKUProvisioningState ¶
type RackSKUProvisioningState string
RackSKUProvisioningState - The provisioning state of the rack SKU resource.
const ( RackSKUProvisioningStateCanceled RackSKUProvisioningState = "Canceled" RackSKUProvisioningStateFailed RackSKUProvisioningState = "Failed" RackSKUProvisioningStateSucceeded RackSKUProvisioningState = "Succeeded" )
func PossibleRackSKUProvisioningStateValues ¶
func PossibleRackSKUProvisioningStateValues() []RackSKUProvisioningState
PossibleRackSKUProvisioningStateValues returns the possible values for the RackSKUProvisioningState const type.
type RackSKUType ¶
type RackSKUType string
RackSKUType - The type of the rack.
const ( RackSKUTypeAggregator RackSKUType = "Aggregator" RackSKUTypeCompute RackSKUType = "Compute" RackSKUTypeSingle RackSKUType = "Single" )
func PossibleRackSKUTypeValues ¶
func PossibleRackSKUTypeValues() []RackSKUType
PossibleRackSKUTypeValues returns the possible values for the RackSKUType const type.
type RackSKUsClient ¶
type RackSKUsClient struct {
// contains filtered or unexported fields
}
RackSKUsClient contains the methods for the RackSKUs group. Don't use this type directly, use NewRackSKUsClient() instead.
func NewRackSKUsClient ¶
func NewRackSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RackSKUsClient, error)
NewRackSKUsClient creates a new instance of RackSKUsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RackSKUsClient) Get ¶
func (client *RackSKUsClient) Get(ctx context.Context, rackSKUName string, options *RackSKUsClientGetOptions) (RackSKUsClientGetResponse, error)
Get - Get the properties of the provided rack SKU. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- rackSKUName - The name of the rack SKU.
- options - RackSKUsClientGetOptions contains the optional parameters for the RackSKUsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/RackSkus_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRackSKUsClient().Get(ctx, "rackSkuName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RackSKU = armnetworkcloud.RackSKU{ // Name: to.Ptr("rackSkuName"), // Type: to.Ptr("Microsoft.NetworkCloud/rackSkus"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Properties: &armnetworkcloud.RackSKUProperties{ // Description: to.Ptr("Sample SKU for the single rack."), // ComputeMachines: []*armnetworkcloud.MachineSKUSlot{ // { // Properties: &armnetworkcloud.MachineSKUProperties{ // BootstrapProtocol: to.Ptr(armnetworkcloud.BootstrapProtocolPXE), // CPUCores: to.Ptr[int64](28), // CPUSockets: to.Ptr[int64](2), // Disks: []*armnetworkcloud.MachineDisk{ // { // Type: to.Ptr(armnetworkcloud.DiskTypeSSD), // CapacityGB: to.Ptr[int64](893), // Connection: to.Ptr(armnetworkcloud.MachineSKUDiskConnectionTypeSAS), // }}, // Generation: to.Ptr("8"), // HardwareVersion: to.Ptr("3"), // MemoryCapacityGB: to.Ptr[int64](512), // Model: to.Ptr("PowerEdge R750"), // NetworkInterfaces: []*armnetworkcloud.NetworkInterface{ // { // Address: to.Ptr("04:00.0"), // DeviceConnectionType: to.Ptr(armnetworkcloud.DeviceConnectionTypePCI), // Model: to.Ptr("Broadcom Gigabit Ethernet BCM5720"), // PhysicalSlot: to.Ptr[int64](1), // PortCount: to.Ptr[int64](2), // PortSpeed: to.Ptr[int64](1), // Vendor: to.Ptr("Broadcom Corp"), // }}, // TotalThreads: to.Ptr[int64](112), // Vendor: to.Ptr("Dell"), // }, // RackSlot: to.Ptr[int64](1), // }}, // ControllerMachines: []*armnetworkcloud.MachineSKUSlot{ // { // Properties: &armnetworkcloud.MachineSKUProperties{ // BootstrapProtocol: to.Ptr(armnetworkcloud.BootstrapProtocolPXE), // CPUCores: to.Ptr[int64](8), // CPUSockets: to.Ptr[int64](1), // Disks: []*armnetworkcloud.MachineDisk{ // { // Type: to.Ptr(armnetworkcloud.DiskTypeSSD), // CapacityGB: to.Ptr[int64](893), // Connection: to.Ptr(armnetworkcloud.MachineSKUDiskConnectionTypeSAS), // }}, // Generation: to.Ptr("8"), // HardwareVersion: to.Ptr("3"), // MemoryCapacityGB: to.Ptr[int64](128), // Model: to.Ptr("PowerEdge R650"), // NetworkInterfaces: []*armnetworkcloud.NetworkInterface{ // { // Address: to.Ptr("04:00.0"), // DeviceConnectionType: to.Ptr(armnetworkcloud.DeviceConnectionTypePCI), // Model: to.Ptr("Broadcom Gigabit Ethernet BCM5720"), // PhysicalSlot: to.Ptr[int64](2), // PortCount: to.Ptr[int64](2), // PortSpeed: to.Ptr[int64](1), // Vendor: to.Ptr("Broadcom Corp"), // }}, // TotalThreads: to.Ptr[int64](16), // Vendor: to.Ptr("Dell"), // }, // RackSlot: to.Ptr[int64](5), // }}, // MaxClusterSlots: to.Ptr[int64](0), // ProvisioningState: to.Ptr(armnetworkcloud.RackSKUProvisioningStateSucceeded), // RackType: to.Ptr(armnetworkcloud.RackSKUTypeSingle), // StorageAppliances: []*armnetworkcloud.StorageApplianceSKUSlot{ // { // Properties: &armnetworkcloud.StorageApplianceSKUProperties{ // CapacityGB: to.Ptr[int64](9100), // Model: to.Ptr("x70r3-9"), // }, // RackSlot: to.Ptr[int64](2), // }}, // }, // } }
Output:
func (*RackSKUsClient) NewListBySubscriptionPager ¶
func (client *RackSKUsClient) NewListBySubscriptionPager(options *RackSKUsClientListBySubscriptionOptions) *runtime.Pager[RackSKUsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of rack SKUs in the provided subscription.
Generated from API version 2024-07-01
- options - RackSKUsClientListBySubscriptionOptions contains the optional parameters for the RackSKUsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/RackSkus_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRackSKUsClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RackSKUList = armnetworkcloud.RackSKUList{ // Value: []*armnetworkcloud.RackSKU{ // { // Name: to.Ptr("rackSkuName"), // Type: to.Ptr("Microsoft.NetworkCloud/rackSkus"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Properties: &armnetworkcloud.RackSKUProperties{ // Description: to.Ptr("Sample SKU for the single rack."), // ComputeMachines: []*armnetworkcloud.MachineSKUSlot{ // { // Properties: &armnetworkcloud.MachineSKUProperties{ // BootstrapProtocol: to.Ptr(armnetworkcloud.BootstrapProtocolPXE), // CPUCores: to.Ptr[int64](28), // CPUSockets: to.Ptr[int64](2), // Disks: []*armnetworkcloud.MachineDisk{ // { // Type: to.Ptr(armnetworkcloud.DiskTypeSSD), // CapacityGB: to.Ptr[int64](893), // Connection: to.Ptr(armnetworkcloud.MachineSKUDiskConnectionTypeSAS), // }}, // Generation: to.Ptr("8"), // HardwareVersion: to.Ptr("3"), // MemoryCapacityGB: to.Ptr[int64](512), // Model: to.Ptr("PowerEdge R750"), // NetworkInterfaces: []*armnetworkcloud.NetworkInterface{ // { // Address: to.Ptr("04:00.0"), // DeviceConnectionType: to.Ptr(armnetworkcloud.DeviceConnectionTypePCI), // Model: to.Ptr("Broadcom Gigabit Ethernet BCM5720"), // PhysicalSlot: to.Ptr[int64](1), // PortCount: to.Ptr[int64](2), // PortSpeed: to.Ptr[int64](1), // Vendor: to.Ptr("Broadcom Corp"), // }}, // TotalThreads: to.Ptr[int64](112), // Vendor: to.Ptr("Dell"), // }, // RackSlot: to.Ptr[int64](1), // }}, // ControllerMachines: []*armnetworkcloud.MachineSKUSlot{ // { // Properties: &armnetworkcloud.MachineSKUProperties{ // BootstrapProtocol: to.Ptr(armnetworkcloud.BootstrapProtocolPXE), // CPUCores: to.Ptr[int64](8), // CPUSockets: to.Ptr[int64](1), // Disks: []*armnetworkcloud.MachineDisk{ // { // Type: to.Ptr(armnetworkcloud.DiskTypeSSD), // CapacityGB: to.Ptr[int64](893), // Connection: to.Ptr(armnetworkcloud.MachineSKUDiskConnectionTypeSAS), // }}, // Generation: to.Ptr("8"), // HardwareVersion: to.Ptr("3"), // MemoryCapacityGB: to.Ptr[int64](128), // Model: to.Ptr("PowerEdge R650"), // NetworkInterfaces: []*armnetworkcloud.NetworkInterface{ // { // Address: to.Ptr("04:00.0"), // DeviceConnectionType: to.Ptr(armnetworkcloud.DeviceConnectionTypePCI), // Model: to.Ptr("Broadcom Gigabit Ethernet BCM5720"), // PhysicalSlot: to.Ptr[int64](2), // PortCount: to.Ptr[int64](2), // PortSpeed: to.Ptr[int64](1), // Vendor: to.Ptr("Broadcom Corp"), // }}, // TotalThreads: to.Ptr[int64](16), // Vendor: to.Ptr("Dell"), // }, // RackSlot: to.Ptr[int64](5), // }}, // MaxClusterSlots: to.Ptr[int64](0), // ProvisioningState: to.Ptr(armnetworkcloud.RackSKUProvisioningStateSucceeded), // RackType: to.Ptr(armnetworkcloud.RackSKUTypeSingle), // StorageAppliances: []*armnetworkcloud.StorageApplianceSKUSlot{ // { // Properties: &armnetworkcloud.StorageApplianceSKUProperties{ // CapacityGB: to.Ptr[int64](9100), // Model: to.Ptr("x70r3-9"), // }, // RackSlot: to.Ptr[int64](2), // }}, // }, // }}, // } } }
Output:
type RackSKUsClientGetOptions ¶
type RackSKUsClientGetOptions struct { }
RackSKUsClientGetOptions contains the optional parameters for the RackSKUsClient.Get method.
type RackSKUsClientGetResponse ¶
type RackSKUsClientGetResponse struct { // RackSku represents the SKU information of the rack. RackSKU }
RackSKUsClientGetResponse contains the response from method RackSKUsClient.Get.
type RackSKUsClientListBySubscriptionOptions ¶
type RackSKUsClientListBySubscriptionOptions struct { }
RackSKUsClientListBySubscriptionOptions contains the optional parameters for the RackSKUsClient.NewListBySubscriptionPager method.
type RackSKUsClientListBySubscriptionResponse ¶
type RackSKUsClientListBySubscriptionResponse struct { // RackSkuList represents a list of rack SKUs. RackSKUList }
RackSKUsClientListBySubscriptionResponse contains the response from method RackSKUsClient.NewListBySubscriptionPager.
type RacksClient ¶
type RacksClient struct {
// contains filtered or unexported fields
}
RacksClient contains the methods for the Racks group. Don't use this type directly, use NewRacksClient() instead.
func NewRacksClient ¶
func NewRacksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RacksClient, error)
NewRacksClient creates a new instance of RacksClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RacksClient) BeginCreateOrUpdate ¶
func (client *RacksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, rackName string, rackParameters Rack, options *RacksClientBeginCreateOrUpdateOptions) (*runtime.Poller[RacksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- rackName - The name of the rack.
- rackParameters - The request body.
- options - RacksClientBeginCreateOrUpdateOptions contains the optional parameters for the RacksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Racks_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewRacksClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "rackName", armnetworkcloud.Rack{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.RackProperties{ AvailabilityZone: to.Ptr("1"), RackLocation: to.Ptr("Rack 28"), RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Rack = armnetworkcloud.Rack{ // Name: to.Ptr("rackName"), // Type: to.Ptr("Microsoft.NetworkCloud/racks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.RackProperties{ // AvailabilityZone: to.Ptr("1"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.RackDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Rack is operational"), // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // } }
Output:
func (*RacksClient) BeginDelete ¶
func (client *RacksClient) BeginDelete(ctx context.Context, resourceGroupName string, rackName string, options *RacksClientBeginDeleteOptions) (*runtime.Poller[RacksClientDeleteResponse], error)
BeginDelete - Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- rackName - The name of the rack.
- options - RacksClientBeginDeleteOptions contains the optional parameters for the RacksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Racks_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewRacksClient().BeginDelete(ctx, "resourceGroupName", "rackName", 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 (*RacksClient) BeginUpdate ¶
func (client *RacksClient) BeginUpdate(ctx context.Context, resourceGroupName string, rackName string, rackUpdateParameters RackPatchParameters, options *RacksClientBeginUpdateOptions) (*runtime.Poller[RacksClientUpdateResponse], error)
BeginUpdate - Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- rackName - The name of the rack.
- rackUpdateParameters - The request body.
- options - RacksClientBeginUpdateOptions contains the optional parameters for the RacksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Racks_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewRacksClient().BeginUpdate(ctx, "resourceGroupName", "rackName", armnetworkcloud.RackPatchParameters{ Properties: &armnetworkcloud.RacksPatchProperties{ RackLocation: to.Ptr("Rack 2B"), RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Rack = armnetworkcloud.Rack{ // Name: to.Ptr("rackName"), // Type: to.Ptr("Microsoft.NetworkCloud/racks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.RackProperties{ // AvailabilityZone: to.Ptr("1"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.RackDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Rack is operational"), // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // } }
Output:
func (*RacksClient) Get ¶
func (client *RacksClient) Get(ctx context.Context, resourceGroupName string, rackName string, options *RacksClientGetOptions) (RacksClientGetResponse, error)
Get - Get properties of the provided rack. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- rackName - The name of the rack.
- options - RacksClientGetOptions contains the optional parameters for the RacksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Racks_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRacksClient().Get(ctx, "resourceGroupName", "rackName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Rack = armnetworkcloud.Rack{ // Name: to.Ptr("rackName"), // Type: to.Ptr("Microsoft.NetworkCloud/racks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.RackProperties{ // AvailabilityZone: to.Ptr("1"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.RackDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Rack is operational"), // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // } }
Output:
func (*RacksClient) NewListByResourceGroupPager ¶
func (client *RacksClient) NewListByResourceGroupPager(resourceGroupName string, options *RacksClientListByResourceGroupOptions) *runtime.Pager[RacksClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of racks in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - RacksClientListByResourceGroupOptions contains the optional parameters for the RacksClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Racks_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRacksClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RackList = armnetworkcloud.RackList{ // Value: []*armnetworkcloud.Rack{ // { // Name: to.Ptr("rackName"), // Type: to.Ptr("Microsoft.NetworkCloud/racks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.RackProperties{ // AvailabilityZone: to.Ptr("1"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.RackDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Rack is operational"), // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // }}, // } } }
Output:
func (*RacksClient) NewListBySubscriptionPager ¶
func (client *RacksClient) NewListBySubscriptionPager(options *RacksClientListBySubscriptionOptions) *runtime.Pager[RacksClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of racks in the provided subscription.
Generated from API version 2024-07-01
- options - RacksClientListBySubscriptionOptions contains the optional parameters for the RacksClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Racks_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRacksClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RackList = armnetworkcloud.RackList{ // Value: []*armnetworkcloud.Rack{ // { // Name: to.Ptr("rackName"), // Type: to.Ptr("Microsoft.NetworkCloud/racks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.RackProperties{ // AvailabilityZone: to.Ptr("1"), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.RackDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Rack is operational"), // ProvisioningState: to.Ptr(armnetworkcloud.RackProvisioningStateSucceeded), // RackLocation: to.Ptr("Rack 28"), // RackSerialNumber: to.Ptr("RACK_SERIAL_NUMBER"), // RackSKUID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName"), // }, // }}, // } } }
Output:
type RacksClientBeginCreateOrUpdateOptions ¶
type RacksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RacksClientBeginCreateOrUpdateOptions contains the optional parameters for the RacksClient.BeginCreateOrUpdate method.
type RacksClientBeginDeleteOptions ¶
type RacksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RacksClientBeginDeleteOptions contains the optional parameters for the RacksClient.BeginDelete method.
type RacksClientBeginUpdateOptions ¶
type RacksClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RacksClientBeginUpdateOptions contains the optional parameters for the RacksClient.BeginUpdate method.
type RacksClientCreateOrUpdateResponse ¶
type RacksClientCreateOrUpdateResponse struct { // Rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. Rack }
RacksClientCreateOrUpdateResponse contains the response from method RacksClient.BeginCreateOrUpdate.
type RacksClientDeleteResponse ¶
type RacksClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
RacksClientDeleteResponse contains the response from method RacksClient.BeginDelete.
type RacksClientGetOptions ¶
type RacksClientGetOptions struct { }
RacksClientGetOptions contains the optional parameters for the RacksClient.Get method.
type RacksClientGetResponse ¶
type RacksClientGetResponse struct { // Rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. Rack }
RacksClientGetResponse contains the response from method RacksClient.Get.
type RacksClientListByResourceGroupOptions ¶
type RacksClientListByResourceGroupOptions struct { }
RacksClientListByResourceGroupOptions contains the optional parameters for the RacksClient.NewListByResourceGroupPager method.
type RacksClientListByResourceGroupResponse ¶
type RacksClientListByResourceGroupResponse struct { // RackList represents a list of racks. RackList }
RacksClientListByResourceGroupResponse contains the response from method RacksClient.NewListByResourceGroupPager.
type RacksClientListBySubscriptionOptions ¶
type RacksClientListBySubscriptionOptions struct { }
RacksClientListBySubscriptionOptions contains the optional parameters for the RacksClient.NewListBySubscriptionPager method.
type RacksClientListBySubscriptionResponse ¶
type RacksClientListBySubscriptionResponse struct { // RackList represents a list of racks. RackList }
RacksClientListBySubscriptionResponse contains the response from method RacksClient.NewListBySubscriptionPager.
type RacksClientUpdateResponse ¶
type RacksClientUpdateResponse struct { // Rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. Rack }
RacksClientUpdateResponse contains the response from method RacksClient.BeginUpdate.
type RacksPatchProperties ¶
type RacksPatchProperties struct { // The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle 9, Rack 2B”) RackLocation *string // The globally unique identifier for the rack. RackSerialNumber *string }
RacksPatchProperties represents the properties of the rack during patching.
func (RacksPatchProperties) MarshalJSON ¶
func (r RacksPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RacksPatchProperties.
func (*RacksPatchProperties) UnmarshalJSON ¶
func (r *RacksPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RacksPatchProperties.
type RemoteVendorManagementFeature ¶
type RemoteVendorManagementFeature string
RemoteVendorManagementFeature - The indicator of whether the storage appliance supports remote vendor management.
const ( RemoteVendorManagementFeatureSupported RemoteVendorManagementFeature = "Supported" RemoteVendorManagementFeatureUnsupported RemoteVendorManagementFeature = "Unsupported" )
func PossibleRemoteVendorManagementFeatureValues ¶
func PossibleRemoteVendorManagementFeatureValues() []RemoteVendorManagementFeature
PossibleRemoteVendorManagementFeatureValues returns the possible values for the RemoteVendorManagementFeature const type.
type RemoteVendorManagementStatus ¶
type RemoteVendorManagementStatus string
RemoteVendorManagementStatus - The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature.
const ( RemoteVendorManagementStatusDisabled RemoteVendorManagementStatus = "Disabled" RemoteVendorManagementStatusEnabled RemoteVendorManagementStatus = "Enabled" RemoteVendorManagementStatusUnsupported RemoteVendorManagementStatus = "Unsupported" )
func PossibleRemoteVendorManagementStatusValues ¶
func PossibleRemoteVendorManagementStatusValues() []RemoteVendorManagementStatus
PossibleRemoteVendorManagementStatusValues returns the possible values for the RemoteVendorManagementStatus const type.
type RuntimeProtectionConfiguration ¶ added in v1.2.0
type RuntimeProtectionConfiguration struct { // The mode of operation for runtime protection. EnforcementLevel *RuntimeProtectionEnforcementLevel }
RuntimeProtectionConfiguration represents the runtime protection configuration for the cluster.
func (RuntimeProtectionConfiguration) MarshalJSON ¶ added in v1.2.0
func (r RuntimeProtectionConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RuntimeProtectionConfiguration.
func (*RuntimeProtectionConfiguration) UnmarshalJSON ¶ added in v1.2.0
func (r *RuntimeProtectionConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeProtectionConfiguration.
type RuntimeProtectionEnforcementLevel ¶ added in v1.2.0
type RuntimeProtectionEnforcementLevel string
RuntimeProtectionEnforcementLevel - The mode of operation for runtime protection.
const ( RuntimeProtectionEnforcementLevelAudit RuntimeProtectionEnforcementLevel = "Audit" RuntimeProtectionEnforcementLevelDisabled RuntimeProtectionEnforcementLevel = "Disabled" RuntimeProtectionEnforcementLevelOnDemand RuntimeProtectionEnforcementLevel = "OnDemand" RuntimeProtectionEnforcementLevelPassive RuntimeProtectionEnforcementLevel = "Passive" RuntimeProtectionEnforcementLevelRealTime RuntimeProtectionEnforcementLevel = "RealTime" )
func PossibleRuntimeProtectionEnforcementLevelValues ¶ added in v1.2.0
func PossibleRuntimeProtectionEnforcementLevelValues() []RuntimeProtectionEnforcementLevel
PossibleRuntimeProtectionEnforcementLevelValues returns the possible values for the RuntimeProtectionEnforcementLevel const type.
type RuntimeProtectionStatus ¶ added in v1.2.0
type RuntimeProtectionStatus struct { // READ-ONLY; The timestamp when the malware definitions were last updated. DefinitionsLastUpdated *time.Time // READ-ONLY; The version of the malware definitions. DefinitionsVersion *string // READ-ONLY; The timestamp of the most recently completed scan, or empty if there has never been a scan. ScanCompletedTime *time.Time // READ-ONLY; The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. ScanScheduledTime *time.Time // READ-ONLY; The timestamp of the most recently started scan, or empty if there has never been a scan. ScanStartedTime *time.Time }
RuntimeProtectionStatus represents the runtime protection status of the bare metal machine.
func (RuntimeProtectionStatus) MarshalJSON ¶ added in v1.2.0
func (r RuntimeProtectionStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RuntimeProtectionStatus.
func (*RuntimeProtectionStatus) UnmarshalJSON ¶ added in v1.2.0
func (r *RuntimeProtectionStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeProtectionStatus.
type SSHPublicKey ¶
type SSHPublicKey struct { // REQUIRED; The SSH public key data. KeyData *string }
SSHPublicKey - SshPublicKey represents the public key used to authenticate with a resource through SSH.
func (SSHPublicKey) MarshalJSON ¶
func (s SSHPublicKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
func (*SSHPublicKey) UnmarshalJSON ¶
func (s *SSHPublicKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
type SecretArchiveReference ¶ added in v1.2.0
type SecretArchiveReference struct { // READ-ONLY; The resource ID of the key vault containing the secret. KeyVaultID *string // READ-ONLY; The name of the secret in the key vault. SecretName *string // READ-ONLY; The version of the secret in the key vault. SecretVersion *string }
SecretArchiveReference represents the reference to a secret in a key vault.
func (SecretArchiveReference) MarshalJSON ¶ added in v1.2.0
func (s SecretArchiveReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretArchiveReference.
func (*SecretArchiveReference) UnmarshalJSON ¶ added in v1.2.0
func (s *SecretArchiveReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretArchiveReference.
type SecretRotationStatus ¶ added in v1.2.0
type SecretRotationStatus struct { // READ-ONLY; The maximum number of days the secret may be used before it must be changed. ExpirePeriodDays *int64 // READ-ONLY; The date and time when the secret was last changed. LastRotationTime *time.Time // READ-ONLY; The number of days a secret exists before rotations will be attempted. RotationPeriodDays *int64 // READ-ONLY; The reference to the secret in a key vault. SecretArchiveReference *SecretArchiveReference // READ-ONLY; The type name used to identify the purpose of the secret. SecretType *string }
SecretRotationStatus represents the status of a secret rotation.
func (SecretRotationStatus) MarshalJSON ¶ added in v1.2.0
func (s SecretRotationStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretRotationStatus.
func (*SecretRotationStatus) UnmarshalJSON ¶ added in v1.2.0
func (s *SecretRotationStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretRotationStatus.
type ServiceLoadBalancerBgpPeer ¶ added in v0.2.0
type ServiceLoadBalancerBgpPeer struct { // REQUIRED; The name used to identify this BGP peer for association with a BGP advertisement. Name *string // REQUIRED; The IPv4 or IPv6 address used to connect this BGP session. PeerAddress *string // REQUIRED; The autonomous system number expected from the remote end of the BGP session. PeerAsn *int64 // The indicator of BFD enablement for this BgpPeer. BfdEnabled *BfdEnabled // The indicator to enable multi-hop peering support. BgpMultiHop *BgpMultiHop // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested // BGP hold time value. This field uses ISO 8601 duration format, for example // P1H. HoldTime *string // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested // BGP keepalive time value. This field uses ISO 8601 duration format, for // example P1H. KeepAliveTime *string // The autonomous system number used for the local end of the BGP session. MyAsn *int64 // The authentication password for routers enforcing TCP MD5 authenticated sessions. Password *string // The port used to connect this BGP session. PeerPort *int64 }
ServiceLoadBalancerBgpPeer represents the configuration of the BGP service load balancer for the Kubernetes cluster.
func (ServiceLoadBalancerBgpPeer) MarshalJSON ¶ added in v0.2.0
func (s ServiceLoadBalancerBgpPeer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceLoadBalancerBgpPeer.
func (*ServiceLoadBalancerBgpPeer) UnmarshalJSON ¶ added in v0.2.0
func (s *ServiceLoadBalancerBgpPeer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceLoadBalancerBgpPeer.
type ServicePrincipalInformation ¶
type ServicePrincipalInformation struct { // REQUIRED; The application ID, also known as client ID, of the service principal. ApplicationID *string // REQUIRED; The password of the service principal. Password *string // REQUIRED; The principal ID, also known as the object ID, of the service principal. PrincipalID *string // REQUIRED; The tenant ID, also known as the directory ID, of the tenant in which the service principal is created. TenantID *string }
ServicePrincipalInformation represents the details of the service principal to be used by the cluster during Arc Appliance installation.
func (ServicePrincipalInformation) MarshalJSON ¶
func (s ServicePrincipalInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipalInformation.
func (*ServicePrincipalInformation) UnmarshalJSON ¶
func (s *ServicePrincipalInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalInformation.
type SkipShutdown ¶
type SkipShutdown string
SkipShutdown - The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately.
const ( SkipShutdownFalse SkipShutdown = "False" SkipShutdownTrue SkipShutdown = "True" )
func PossibleSkipShutdownValues ¶
func PossibleSkipShutdownValues() []SkipShutdown
PossibleSkipShutdownValues returns the possible values for the SkipShutdown const type.
type StorageAppliance ¶
type StorageAppliance struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *StorageApplianceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
StorageAppliance represents on-premises Network Cloud storage appliance.
func (StorageAppliance) MarshalJSON ¶
func (s StorageAppliance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageAppliance.
func (*StorageAppliance) UnmarshalJSON ¶
func (s *StorageAppliance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageAppliance.
type StorageApplianceConfigurationData ¶
type StorageApplianceConfigurationData struct { // REQUIRED; The credentials of the administrative interface on this storage appliance. AdminCredentials *AdministrativeCredentials // REQUIRED; The slot that storage appliance is in the rack based on the BOM configuration. RackSlot *int64 // REQUIRED; The serial number of the appliance. SerialNumber *string // The user-provided name for the storage appliance that will be created from this specification. StorageApplianceName *string }
StorageApplianceConfigurationData represents configuration for the storage application.
func (StorageApplianceConfigurationData) MarshalJSON ¶
func (s StorageApplianceConfigurationData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageApplianceConfigurationData.
func (*StorageApplianceConfigurationData) UnmarshalJSON ¶
func (s *StorageApplianceConfigurationData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageApplianceConfigurationData.
type StorageApplianceDetailedStatus ¶
type StorageApplianceDetailedStatus string
StorageApplianceDetailedStatus - The detailed status of the storage appliance.
const ( StorageApplianceDetailedStatusAvailable StorageApplianceDetailedStatus = "Available" StorageApplianceDetailedStatusError StorageApplianceDetailedStatus = "Error" StorageApplianceDetailedStatusProvisioning StorageApplianceDetailedStatus = "Provisioning" )
func PossibleStorageApplianceDetailedStatusValues ¶
func PossibleStorageApplianceDetailedStatusValues() []StorageApplianceDetailedStatus
PossibleStorageApplianceDetailedStatusValues returns the possible values for the StorageApplianceDetailedStatus const type.
type StorageApplianceEnableRemoteVendorManagementParameters ¶
type StorageApplianceEnableRemoteVendorManagementParameters struct { // Field Deprecated. This field is not used and will be rejected if provided. The list of IPv4 subnets (in CIDR format), IPv6 // subnets (in CIDR format), or hostnames that the storage appliance needs // accessible in order to turn on the remote vendor management. SupportEndpoints []*string }
StorageApplianceEnableRemoteVendorManagementParameters represents the body of the request to enable remote vendor management of a storage appliance.
func (StorageApplianceEnableRemoteVendorManagementParameters) MarshalJSON ¶
func (s StorageApplianceEnableRemoteVendorManagementParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageApplianceEnableRemoteVendorManagementParameters.
func (*StorageApplianceEnableRemoteVendorManagementParameters) UnmarshalJSON ¶
func (s *StorageApplianceEnableRemoteVendorManagementParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageApplianceEnableRemoteVendorManagementParameters.
type StorageApplianceList ¶
type StorageApplianceList struct { // The link used to get the next page of operations. NextLink *string // The list of storage appliances. Value []*StorageAppliance }
StorageApplianceList represents a list of storage appliances.
func (StorageApplianceList) MarshalJSON ¶
func (s StorageApplianceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageApplianceList.
func (*StorageApplianceList) UnmarshalJSON ¶
func (s *StorageApplianceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageApplianceList.
type StorageAppliancePatchParameters ¶
type StorageAppliancePatchParameters struct { // The list of the resource properties. Properties *StorageAppliancePatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
StorageAppliancePatchParameters represents the body of the request to patch storage appliance properties.
func (StorageAppliancePatchParameters) MarshalJSON ¶
func (s StorageAppliancePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageAppliancePatchParameters.
func (*StorageAppliancePatchParameters) UnmarshalJSON ¶
func (s *StorageAppliancePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageAppliancePatchParameters.
type StorageAppliancePatchProperties ¶
type StorageAppliancePatchProperties struct { // The serial number for the storage appliance. SerialNumber *string }
StorageAppliancePatchProperties represents the properties of the storage appliance that can be patched.
func (StorageAppliancePatchProperties) MarshalJSON ¶
func (s StorageAppliancePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageAppliancePatchProperties.
func (*StorageAppliancePatchProperties) UnmarshalJSON ¶
func (s *StorageAppliancePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageAppliancePatchProperties.
type StorageApplianceProperties ¶
type StorageApplianceProperties struct { // REQUIRED; The credentials of the administrative interface on this storage appliance. AdministratorCredentials *AdministrativeCredentials // REQUIRED; The resource ID of the rack where this storage appliance resides. RackID *string // REQUIRED; The slot the storage appliance is in the rack based on the BOM configuration. RackSlot *int64 // REQUIRED; The serial number for the storage appliance. SerialNumber *string // REQUIRED; The SKU for the storage appliance. StorageApplianceSKUID *string // READ-ONLY; The total capacity of the storage appliance. Capacity *int64 // READ-ONLY; The amount of storage consumed. CapacityUsed *int64 // READ-ONLY; The resource ID of the cluster this storage appliance is associated with. ClusterID *string // READ-ONLY; The detailed status of the storage appliance. DetailedStatus *StorageApplianceDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The endpoint for the management interface of the storage appliance. ManagementIPv4Address *string // READ-ONLY; The manufacturer of the storage appliance. Manufacturer *string // READ-ONLY; The model of the storage appliance. Model *string // READ-ONLY; The provisioning state of the storage appliance. ProvisioningState *StorageApplianceProvisioningState // READ-ONLY; The indicator of whether the storage appliance supports remote vendor management. RemoteVendorManagementFeature *RemoteVendorManagementFeature // READ-ONLY; The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is // an unsupported feature. RemoteVendorManagementStatus *RemoteVendorManagementStatus // READ-ONLY; The list of statuses that represent secret rotation activity. SecretRotationStatus []*SecretRotationStatus // READ-ONLY; The version of the storage appliance. Version *string }
StorageApplianceProperties represents the properties of the storage appliance.
func (StorageApplianceProperties) MarshalJSON ¶
func (s StorageApplianceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageApplianceProperties.
func (*StorageApplianceProperties) UnmarshalJSON ¶
func (s *StorageApplianceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageApplianceProperties.
type StorageApplianceProvisioningState ¶
type StorageApplianceProvisioningState string
StorageApplianceProvisioningState - The provisioning state of the storage appliance.
const ( StorageApplianceProvisioningStateAccepted StorageApplianceProvisioningState = "Accepted" StorageApplianceProvisioningStateCanceled StorageApplianceProvisioningState = "Canceled" StorageApplianceProvisioningStateFailed StorageApplianceProvisioningState = "Failed" StorageApplianceProvisioningStateProvisioning StorageApplianceProvisioningState = "Provisioning" StorageApplianceProvisioningStateSucceeded StorageApplianceProvisioningState = "Succeeded" )
func PossibleStorageApplianceProvisioningStateValues ¶
func PossibleStorageApplianceProvisioningStateValues() []StorageApplianceProvisioningState
PossibleStorageApplianceProvisioningStateValues returns the possible values for the StorageApplianceProvisioningState const type.
type StorageApplianceSKUProperties ¶
type StorageApplianceSKUProperties struct { // READ-ONLY; The maximum capacity of the storage appliance. Measured in gibibytes. CapacityGB *int64 // READ-ONLY; The model of the storage appliance. Model *string }
StorageApplianceSKUProperties - StorageApplianceSkuProperties represents the properties of the storage appliance SKU.
func (StorageApplianceSKUProperties) MarshalJSON ¶
func (s StorageApplianceSKUProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageApplianceSKUProperties.
func (*StorageApplianceSKUProperties) UnmarshalJSON ¶
func (s *StorageApplianceSKUProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageApplianceSKUProperties.
type StorageApplianceSKUSlot ¶
type StorageApplianceSKUSlot struct { // The list of the resource properties. Properties *StorageApplianceSKUProperties // READ-ONLY; The position in the rack for the storage appliance. RackSlot *int64 }
StorageApplianceSKUSlot - StorageApplianceSkuSlot represents the single SKU and rack slot associated with the storage appliance.
func (StorageApplianceSKUSlot) MarshalJSON ¶
func (s StorageApplianceSKUSlot) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageApplianceSKUSlot.
func (*StorageApplianceSKUSlot) UnmarshalJSON ¶
func (s *StorageApplianceSKUSlot) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageApplianceSKUSlot.
type StorageAppliancesClient ¶
type StorageAppliancesClient struct {
// contains filtered or unexported fields
}
StorageAppliancesClient contains the methods for the StorageAppliances group. Don't use this type directly, use NewStorageAppliancesClient() instead.
func NewStorageAppliancesClient ¶
func NewStorageAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageAppliancesClient, error)
NewStorageAppliancesClient creates a new instance of StorageAppliancesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StorageAppliancesClient) BeginCreateOrUpdate ¶
func (client *StorageAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, storageApplianceName string, storageApplianceParameters StorageAppliance, options *StorageAppliancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageAppliancesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageApplianceName - The name of the storage appliance.
- storageApplianceParameters - The request body.
- options - StorageAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageAppliancesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageAppliancesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "storageApplianceName", armnetworkcloud.StorageAppliance{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.StorageApplianceProperties{ AdministratorCredentials: &armnetworkcloud.AdministrativeCredentials{ Password: to.Ptr("{password}"), Username: to.Ptr("adminUser"), }, RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), RackSlot: to.Ptr[int64](1), SerialNumber: to.Ptr("BM1219XXX"), StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageAppliance = armnetworkcloud.StorageAppliance{ // Name: to.Ptr("storageApplianceName"), // Type: to.Ptr("Microsoft.NetworkCloud/storageAppliances"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.StorageApplianceProperties{ // AdministratorCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("adminUser"), // }, // Capacity: to.Ptr[int64](893), // CapacityUsed: to.Ptr[int64](500), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), // Manufacturer: to.Ptr("Contoso Storage"), // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Storage Appliance User"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), // Version: to.Ptr("9.9.9"), // }, // } }
Output:
func (*StorageAppliancesClient) BeginDelete ¶
func (client *StorageAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientBeginDeleteOptions) (*runtime.Poller[StorageAppliancesClientDeleteResponse], error)
BeginDelete - Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageApplianceName - The name of the storage appliance.
- options - StorageAppliancesClientBeginDeleteOptions contains the optional parameters for the StorageAppliancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageAppliancesClient().BeginDelete(ctx, "resourceGroupName", "storageApplianceName", 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 (*StorageAppliancesClient) BeginDisableRemoteVendorManagement ¶
func (client *StorageAppliancesClient) BeginDisableRemoteVendorManagement(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientBeginDisableRemoteVendorManagementOptions) (*runtime.Poller[StorageAppliancesClientDisableRemoteVendorManagementResponse], error)
BeginDisableRemoteVendorManagement - Disable remote vendor management of the provided storage appliance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageApplianceName - The name of the storage appliance.
- options - StorageAppliancesClientBeginDisableRemoteVendorManagementOptions contains the optional parameters for the StorageAppliancesClient.BeginDisableRemoteVendorManagement method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_DisableRemoteVendorManagement.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageAppliancesClient().BeginDisableRemoteVendorManagement(ctx, "resourceGroupName", "storageApplianceName", 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 (*StorageAppliancesClient) BeginEnableRemoteVendorManagement ¶
func (client *StorageAppliancesClient) BeginEnableRemoteVendorManagement(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientBeginEnableRemoteVendorManagementOptions) (*runtime.Poller[StorageAppliancesClientEnableRemoteVendorManagementResponse], error)
BeginEnableRemoteVendorManagement - Enable remote vendor management of the provided storage appliance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageApplianceName - The name of the storage appliance.
- options - StorageAppliancesClientBeginEnableRemoteVendorManagementOptions contains the optional parameters for the StorageAppliancesClient.BeginEnableRemoteVendorManagement method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_EnableRemoteVendorManagement.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageAppliancesClient().BeginEnableRemoteVendorManagement(ctx, "resourceGroupName", "storageApplianceName", &armnetworkcloud.StorageAppliancesClientBeginEnableRemoteVendorManagementOptions{StorageApplianceEnableRemoteVendorManagementParameters: &armnetworkcloud.StorageApplianceEnableRemoteVendorManagementParameters{ SupportEndpoints: []*string{ to.Ptr("10.0.0.0/24")}, }, }) 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 (*StorageAppliancesClient) BeginUpdate ¶
func (client *StorageAppliancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageApplianceName string, storageApplianceUpdateParameters StorageAppliancePatchParameters, options *StorageAppliancesClientBeginUpdateOptions) (*runtime.Poller[StorageAppliancesClientUpdateResponse], error)
BeginUpdate - Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageApplianceName - The name of the storage appliance.
- storageApplianceUpdateParameters - The request body.
- options - StorageAppliancesClientBeginUpdateOptions contains the optional parameters for the StorageAppliancesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageAppliancesClient().BeginUpdate(ctx, "resourceGroupName", "storageApplianceName", armnetworkcloud.StorageAppliancePatchParameters{ Properties: &armnetworkcloud.StorageAppliancePatchProperties{ SerialNumber: to.Ptr("BM1219XXX"), }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageAppliance = armnetworkcloud.StorageAppliance{ // Name: to.Ptr("storageApplianceName"), // Type: to.Ptr("Microsoft.NetworkCloud/storageAppliances"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.StorageApplianceProperties{ // AdministratorCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("adminUser"), // }, // Capacity: to.Ptr[int64](893), // CapacityUsed: to.Ptr[int64](500), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), // Manufacturer: to.Ptr("Contoso Storage"), // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Storage Appliance User"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), // Version: to.Ptr("9.9.9"), // }, // } }
Output:
func (*StorageAppliancesClient) Get ¶
func (client *StorageAppliancesClient) Get(ctx context.Context, resourceGroupName string, storageApplianceName string, options *StorageAppliancesClientGetOptions) (StorageAppliancesClientGetResponse, error)
Get - Get properties of the provided storage appliance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- storageApplianceName - The name of the storage appliance.
- options - StorageAppliancesClientGetOptions contains the optional parameters for the StorageAppliancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStorageAppliancesClient().Get(ctx, "resourceGroupName", "storageApplianceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageAppliance = armnetworkcloud.StorageAppliance{ // Name: to.Ptr("storageApplianceName"), // Type: to.Ptr("Microsoft.NetworkCloud/storageAppliances"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.StorageApplianceProperties{ // AdministratorCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("adminUser"), // }, // Capacity: to.Ptr[int64](893), // CapacityUsed: to.Ptr[int64](500), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), // Manufacturer: to.Ptr("Contoso Storage"), // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Storage Appliance User"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), // Version: to.Ptr("9.9.9"), // }, // } }
Output:
func (*StorageAppliancesClient) NewListByResourceGroupPager ¶
func (client *StorageAppliancesClient) NewListByResourceGroupPager(resourceGroupName string, options *StorageAppliancesClientListByResourceGroupOptions) *runtime.Pager[StorageAppliancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of storage appliances in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - StorageAppliancesClientListByResourceGroupOptions contains the optional parameters for the StorageAppliancesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStorageAppliancesClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.StorageApplianceList = armnetworkcloud.StorageApplianceList{ // Value: []*armnetworkcloud.StorageAppliance{ // { // Name: to.Ptr("storageApplianceName"), // Type: to.Ptr("Microsoft.NetworkCloud/storageAppliances"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.StorageApplianceProperties{ // AdministratorCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("adminUser"), // }, // Capacity: to.Ptr[int64](893), // CapacityUsed: to.Ptr[int64](500), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), // Manufacturer: to.Ptr("Contoso Storage"), // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Storage Appliance User"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), // Version: to.Ptr("9.9.9"), // }, // }}, // } } }
Output:
func (*StorageAppliancesClient) NewListBySubscriptionPager ¶
func (client *StorageAppliancesClient) NewListBySubscriptionPager(options *StorageAppliancesClientListBySubscriptionOptions) *runtime.Pager[StorageAppliancesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of storage appliances in the provided subscription.
Generated from API version 2024-07-01
- options - StorageAppliancesClientListBySubscriptionOptions contains the optional parameters for the StorageAppliancesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/StorageAppliances_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStorageAppliancesClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.StorageApplianceList = armnetworkcloud.StorageApplianceList{ // Value: []*armnetworkcloud.StorageAppliance{ // { // Name: to.Ptr("storageApplianceName"), // Type: to.Ptr("Microsoft.NetworkCloud/storageAppliances"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.StorageApplianceProperties{ // AdministratorCredentials: &armnetworkcloud.AdministrativeCredentials{ // Username: to.Ptr("adminUser"), // }, // Capacity: to.Ptr[int64](893), // CapacityUsed: to.Ptr[int64](500), // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.StorageApplianceDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Storage appliance is up and running"), // ManagementIPv4Address: to.Ptr("192.0.2.2"), // Manufacturer: to.Ptr("Contoso Storage"), // Model: to.Ptr("ArrayStore-Flash70"), // ProvisioningState: to.Ptr(armnetworkcloud.StorageApplianceProvisioningStateSucceeded), // RackID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // RackSlot: to.Ptr[int64](1), // RemoteVendorManagementFeature: to.Ptr(armnetworkcloud.RemoteVendorManagementFeatureSupported), // RemoteVendorManagementStatus: to.Ptr(armnetworkcloud.RemoteVendorManagementStatusEnabled), // SecretRotationStatus: []*armnetworkcloud.SecretRotationStatus{ // { // ExpirePeriodDays: to.Ptr[int64](90), // LastRotationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-30T13:27:23.103Z"); return t}()), // RotationPeriodDays: to.Ptr[int64](60), // SecretArchiveReference: &armnetworkcloud.SecretArchiveReference{ // KeyVaultID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"), // SecretName: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff-resource-group-cluster-1679871-storage-appliance-credential-manager-ffffffff"), // SecretVersion: to.Ptr("02ab6c1f9c0f4982b0632b0d5d74a33b"), // }, // SecretType: to.Ptr("Storage Appliance User"), // }}, // SerialNumber: to.Ptr("BM1219XXX"), // StorageApplianceSKUID: to.Ptr("684E-3B16-399E"), // Version: to.Ptr("9.9.9"), // }, // }}, // } } }
Output:
type StorageAppliancesClientBeginCreateOrUpdateOptions ¶
type StorageAppliancesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageAppliancesClient.BeginCreateOrUpdate method.
type StorageAppliancesClientBeginDeleteOptions ¶
type StorageAppliancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageAppliancesClientBeginDeleteOptions contains the optional parameters for the StorageAppliancesClient.BeginDelete method.
type StorageAppliancesClientBeginDisableRemoteVendorManagementOptions ¶
type StorageAppliancesClientBeginDisableRemoteVendorManagementOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageAppliancesClientBeginDisableRemoteVendorManagementOptions contains the optional parameters for the StorageAppliancesClient.BeginDisableRemoteVendorManagement method.
type StorageAppliancesClientBeginEnableRemoteVendorManagementOptions ¶
type StorageAppliancesClientBeginEnableRemoteVendorManagementOptions struct { // Resumes the LRO from the provided token. ResumeToken string // The request body. StorageApplianceEnableRemoteVendorManagementParameters *StorageApplianceEnableRemoteVendorManagementParameters }
StorageAppliancesClientBeginEnableRemoteVendorManagementOptions contains the optional parameters for the StorageAppliancesClient.BeginEnableRemoteVendorManagement method.
type StorageAppliancesClientBeginUpdateOptions ¶
type StorageAppliancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageAppliancesClientBeginUpdateOptions contains the optional parameters for the StorageAppliancesClient.BeginUpdate method.
type StorageAppliancesClientCreateOrUpdateResponse ¶
type StorageAppliancesClientCreateOrUpdateResponse struct { // StorageAppliance represents on-premises Network Cloud storage appliance. StorageAppliance }
StorageAppliancesClientCreateOrUpdateResponse contains the response from method StorageAppliancesClient.BeginCreateOrUpdate.
type StorageAppliancesClientDeleteResponse ¶
type StorageAppliancesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
StorageAppliancesClientDeleteResponse contains the response from method StorageAppliancesClient.BeginDelete.
type StorageAppliancesClientDisableRemoteVendorManagementResponse ¶
type StorageAppliancesClientDisableRemoteVendorManagementResponse struct { // The current status of an async operation. OperationStatusResult }
StorageAppliancesClientDisableRemoteVendorManagementResponse contains the response from method StorageAppliancesClient.BeginDisableRemoteVendorManagement.
type StorageAppliancesClientEnableRemoteVendorManagementResponse ¶
type StorageAppliancesClientEnableRemoteVendorManagementResponse struct { // The current status of an async operation. OperationStatusResult }
StorageAppliancesClientEnableRemoteVendorManagementResponse contains the response from method StorageAppliancesClient.BeginEnableRemoteVendorManagement.
type StorageAppliancesClientGetOptions ¶
type StorageAppliancesClientGetOptions struct { }
StorageAppliancesClientGetOptions contains the optional parameters for the StorageAppliancesClient.Get method.
type StorageAppliancesClientGetResponse ¶
type StorageAppliancesClientGetResponse struct { // StorageAppliance represents on-premises Network Cloud storage appliance. StorageAppliance }
StorageAppliancesClientGetResponse contains the response from method StorageAppliancesClient.Get.
type StorageAppliancesClientListByResourceGroupOptions ¶
type StorageAppliancesClientListByResourceGroupOptions struct { }
StorageAppliancesClientListByResourceGroupOptions contains the optional parameters for the StorageAppliancesClient.NewListByResourceGroupPager method.
type StorageAppliancesClientListByResourceGroupResponse ¶
type StorageAppliancesClientListByResourceGroupResponse struct { // StorageApplianceList represents a list of storage appliances. StorageApplianceList }
StorageAppliancesClientListByResourceGroupResponse contains the response from method StorageAppliancesClient.NewListByResourceGroupPager.
type StorageAppliancesClientListBySubscriptionOptions ¶
type StorageAppliancesClientListBySubscriptionOptions struct { }
StorageAppliancesClientListBySubscriptionOptions contains the optional parameters for the StorageAppliancesClient.NewListBySubscriptionPager method.
type StorageAppliancesClientListBySubscriptionResponse ¶
type StorageAppliancesClientListBySubscriptionResponse struct { // StorageApplianceList represents a list of storage appliances. StorageApplianceList }
StorageAppliancesClientListBySubscriptionResponse contains the response from method StorageAppliancesClient.NewListBySubscriptionPager.
type StorageAppliancesClientUpdateResponse ¶
type StorageAppliancesClientUpdateResponse struct { // StorageAppliance represents on-premises Network Cloud storage appliance. StorageAppliance }
StorageAppliancesClientUpdateResponse contains the response from method StorageAppliancesClient.BeginUpdate.
type StorageProfile ¶
type StorageProfile struct { // REQUIRED; The disk to use with this virtual machine. OSDisk *OsDisk // The resource IDs of volumes that are requested to be attached to the virtual machine. VolumeAttachments []*string }
StorageProfile represents information about a disk.
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 StringKeyValuePair ¶ added in v1.2.0
type StringKeyValuePair struct { // REQUIRED; The key to the mapped value. Key *string // REQUIRED; The value of the mapping key. Value *string }
StringKeyValuePair represents a single entry in a mapping of keys to values.
func (StringKeyValuePair) MarshalJSON ¶ added in v1.2.0
func (s StringKeyValuePair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StringKeyValuePair.
func (*StringKeyValuePair) UnmarshalJSON ¶ added in v1.2.0
func (s *StringKeyValuePair) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StringKeyValuePair.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrunkedNetwork ¶
type TrunkedNetwork struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *TrunkedNetworkProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to create a trunked network.
func (TrunkedNetwork) MarshalJSON ¶
func (t TrunkedNetwork) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrunkedNetwork.
func (*TrunkedNetwork) UnmarshalJSON ¶
func (t *TrunkedNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrunkedNetwork.
type TrunkedNetworkAttachmentConfiguration ¶ added in v0.2.0
type TrunkedNetworkAttachmentConfiguration struct { // REQUIRED; The resource ID of the network that is being configured for attachment. NetworkID *string // The indicator of how this network will be utilized by the Kubernetes cluster. PluginType *KubernetesPluginType }
TrunkedNetworkAttachmentConfiguration represents the configuration of the attachment of a trunked network.
func (TrunkedNetworkAttachmentConfiguration) MarshalJSON ¶ added in v0.2.0
func (t TrunkedNetworkAttachmentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrunkedNetworkAttachmentConfiguration.
func (*TrunkedNetworkAttachmentConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (t *TrunkedNetworkAttachmentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrunkedNetworkAttachmentConfiguration.
type TrunkedNetworkDetailedStatus ¶
type TrunkedNetworkDetailedStatus string
TrunkedNetworkDetailedStatus - The more detailed status of the trunked network.
const ( TrunkedNetworkDetailedStatusAvailable TrunkedNetworkDetailedStatus = "Available" TrunkedNetworkDetailedStatusError TrunkedNetworkDetailedStatus = "Error" TrunkedNetworkDetailedStatusProvisioning TrunkedNetworkDetailedStatus = "Provisioning" )
func PossibleTrunkedNetworkDetailedStatusValues ¶
func PossibleTrunkedNetworkDetailedStatusValues() []TrunkedNetworkDetailedStatus
PossibleTrunkedNetworkDetailedStatusValues returns the possible values for the TrunkedNetworkDetailedStatus const type.
type TrunkedNetworkList ¶
type TrunkedNetworkList struct { // The link used to get the next page of operations. NextLink *string // The list of trunked networks. Value []*TrunkedNetwork }
TrunkedNetworkList represents a list of trunked networks.
func (TrunkedNetworkList) MarshalJSON ¶
func (t TrunkedNetworkList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrunkedNetworkList.
func (*TrunkedNetworkList) UnmarshalJSON ¶
func (t *TrunkedNetworkList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrunkedNetworkList.
type TrunkedNetworkPatchParameters ¶
type TrunkedNetworkPatchParameters struct { // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
TrunkedNetworkPatchParameters represents the body of the request to patch the Trunked network.
func (TrunkedNetworkPatchParameters) MarshalJSON ¶
func (t TrunkedNetworkPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrunkedNetworkPatchParameters.
func (*TrunkedNetworkPatchParameters) UnmarshalJSON ¶
func (t *TrunkedNetworkPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrunkedNetworkPatchParameters.
type TrunkedNetworkProperties ¶
type TrunkedNetworkProperties struct { // REQUIRED; The list of resource IDs representing the Network Fabric isolation domains. It can be any combination of l2IsolationDomain // and l3IsolationDomain resources. IsolationDomainIDs []*string // REQUIRED; The list of vlans that are selected from the isolation domains for trunking. Vlans []*int64 // Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network // plugin type for Hybrid AKS. HybridAksPluginType *HybridAksPluginType // The default interface name for this trunked network in the virtual machine. This name can be overridden by the name supplied // in the network attachment configuration of that virtual machine. InterfaceName *string // READ-ONLY; The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. AssociatedResourceIDs []*string // READ-ONLY; The resource ID of the Network Cloud cluster this trunked network is associated with. ClusterID *string // READ-ONLY; The more detailed status of the trunked network. DetailedStatus *TrunkedNetworkDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated // with this trunked network. HybridAksClustersAssociatedIDs []*string // READ-ONLY; The provisioning state of the trunked network. ProvisioningState *TrunkedNetworkProvisioningState // READ-ONLY; Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any // Hybrid AKS virtual machines, that are currently using this trunked network. VirtualMachinesAssociatedIDs []*string }
TrunkedNetworkProperties represents properties of the trunked network.
func (TrunkedNetworkProperties) MarshalJSON ¶
func (t TrunkedNetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrunkedNetworkProperties.
func (*TrunkedNetworkProperties) UnmarshalJSON ¶
func (t *TrunkedNetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrunkedNetworkProperties.
type TrunkedNetworkProvisioningState ¶
type TrunkedNetworkProvisioningState string
TrunkedNetworkProvisioningState - The provisioning state of the trunked network.
const ( TrunkedNetworkProvisioningStateAccepted TrunkedNetworkProvisioningState = "Accepted" TrunkedNetworkProvisioningStateCanceled TrunkedNetworkProvisioningState = "Canceled" TrunkedNetworkProvisioningStateFailed TrunkedNetworkProvisioningState = "Failed" TrunkedNetworkProvisioningStateProvisioning TrunkedNetworkProvisioningState = "Provisioning" TrunkedNetworkProvisioningStateSucceeded TrunkedNetworkProvisioningState = "Succeeded" )
func PossibleTrunkedNetworkProvisioningStateValues ¶
func PossibleTrunkedNetworkProvisioningStateValues() []TrunkedNetworkProvisioningState
PossibleTrunkedNetworkProvisioningStateValues returns the possible values for the TrunkedNetworkProvisioningState const type.
type TrunkedNetworksClient ¶
type TrunkedNetworksClient struct {
// contains filtered or unexported fields
}
TrunkedNetworksClient contains the methods for the TrunkedNetworks group. Don't use this type directly, use NewTrunkedNetworksClient() instead.
func NewTrunkedNetworksClient ¶
func NewTrunkedNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TrunkedNetworksClient, error)
NewTrunkedNetworksClient creates a new instance of TrunkedNetworksClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TrunkedNetworksClient) BeginCreateOrUpdate ¶
func (client *TrunkedNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, trunkedNetworkName string, trunkedNetworkParameters TrunkedNetwork, options *TrunkedNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[TrunkedNetworksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new trunked network or update the properties of the existing trunked network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- trunkedNetworkName - The name of the trunked network.
- trunkedNetworkParameters - The request body.
- options - TrunkedNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the TrunkedNetworksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/TrunkedNetworks_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTrunkedNetworksClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "trunkedNetworkName", armnetworkcloud.TrunkedNetwork{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.TrunkedNetworkProperties{ InterfaceName: to.Ptr("eth0"), IsolationDomainIDs: []*string{ to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")}, Vlans: []*int64{ to.Ptr[int64](12), to.Ptr[int64](14)}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TrunkedNetwork = armnetworkcloud.TrunkedNetwork{ // Name: to.Ptr("trunkedNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/trunkedNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.TrunkedNetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.TrunkedNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Trunked network is up"), // InterfaceName: to.Ptr("eth0"), // IsolationDomainIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")}, // ProvisioningState: to.Ptr(armnetworkcloud.TrunkedNetworkProvisioningStateSucceeded), // Vlans: []*int64{ // to.Ptr[int64](12), // to.Ptr[int64](14)}, // }, // } }
Output:
func (*TrunkedNetworksClient) BeginDelete ¶
func (client *TrunkedNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, trunkedNetworkName string, options *TrunkedNetworksClientBeginDeleteOptions) (*runtime.Poller[TrunkedNetworksClientDeleteResponse], error)
BeginDelete - Delete the provided trunked network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- trunkedNetworkName - The name of the trunked network.
- options - TrunkedNetworksClientBeginDeleteOptions contains the optional parameters for the TrunkedNetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/TrunkedNetworks_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTrunkedNetworksClient().BeginDelete(ctx, "resourceGroupName", "trunkedNetworkName", 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 (*TrunkedNetworksClient) Get ¶
func (client *TrunkedNetworksClient) Get(ctx context.Context, resourceGroupName string, trunkedNetworkName string, options *TrunkedNetworksClientGetOptions) (TrunkedNetworksClientGetResponse, error)
Get - Get properties of the provided trunked network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- trunkedNetworkName - The name of the trunked network.
- options - TrunkedNetworksClientGetOptions contains the optional parameters for the TrunkedNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/TrunkedNetworks_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTrunkedNetworksClient().Get(ctx, "resourceGroupName", "trunkedNetworkName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TrunkedNetwork = armnetworkcloud.TrunkedNetwork{ // Name: to.Ptr("trunkedNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/trunkedNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.TrunkedNetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.TrunkedNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Trunked network is up"), // InterfaceName: to.Ptr("eth0"), // IsolationDomainIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")}, // ProvisioningState: to.Ptr(armnetworkcloud.TrunkedNetworkProvisioningStateSucceeded), // Vlans: []*int64{ // to.Ptr[int64](12), // to.Ptr[int64](14)}, // }, // } }
Output:
func (*TrunkedNetworksClient) NewListByResourceGroupPager ¶
func (client *TrunkedNetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *TrunkedNetworksClientListByResourceGroupOptions) *runtime.Pager[TrunkedNetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of trunked networks in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - TrunkedNetworksClientListByResourceGroupOptions contains the optional parameters for the TrunkedNetworksClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/TrunkedNetworks_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTrunkedNetworksClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TrunkedNetworkList = armnetworkcloud.TrunkedNetworkList{ // Value: []*armnetworkcloud.TrunkedNetwork{ // { // Name: to.Ptr("trunkedNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/trunkedNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.TrunkedNetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.TrunkedNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Trunked network is up"), // InterfaceName: to.Ptr("eth0"), // IsolationDomainIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")}, // ProvisioningState: to.Ptr(armnetworkcloud.TrunkedNetworkProvisioningStateSucceeded), // Vlans: []*int64{ // to.Ptr[int64](12), // to.Ptr[int64](14)}, // }, // }}, // } } }
Output:
func (*TrunkedNetworksClient) NewListBySubscriptionPager ¶
func (client *TrunkedNetworksClient) NewListBySubscriptionPager(options *TrunkedNetworksClientListBySubscriptionOptions) *runtime.Pager[TrunkedNetworksClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of trunked networks in the provided subscription.
Generated from API version 2024-07-01
- options - TrunkedNetworksClientListBySubscriptionOptions contains the optional parameters for the TrunkedNetworksClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/TrunkedNetworks_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTrunkedNetworksClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TrunkedNetworkList = armnetworkcloud.TrunkedNetworkList{ // Value: []*armnetworkcloud.TrunkedNetwork{ // { // Name: to.Ptr("trunkedNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/trunkedNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.TrunkedNetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.TrunkedNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Trunked network is up"), // InterfaceName: to.Ptr("eth0"), // IsolationDomainIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")}, // ProvisioningState: to.Ptr(armnetworkcloud.TrunkedNetworkProvisioningStateSucceeded), // Vlans: []*int64{ // to.Ptr[int64](12), // to.Ptr[int64](14)}, // }, // }}, // } } }
Output:
func (*TrunkedNetworksClient) Update ¶
func (client *TrunkedNetworksClient) Update(ctx context.Context, resourceGroupName string, trunkedNetworkName string, trunkedNetworkUpdateParameters TrunkedNetworkPatchParameters, options *TrunkedNetworksClientUpdateOptions) (TrunkedNetworksClientUpdateResponse, error)
Update - Update tags associated with the provided trunked network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- trunkedNetworkName - The name of the trunked network.
- trunkedNetworkUpdateParameters - The request body.
- options - TrunkedNetworksClientUpdateOptions contains the optional parameters for the TrunkedNetworksClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/TrunkedNetworks_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTrunkedNetworksClient().Update(ctx, "resourceGroupName", "trunkedNetworkName", armnetworkcloud.TrunkedNetworkPatchParameters{ Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TrunkedNetwork = armnetworkcloud.TrunkedNetwork{ // Name: to.Ptr("trunkedNetworkName"), // Type: to.Ptr("Microsoft.NetworkCloud/trunkedNetworks"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.TrunkedNetworkProperties{ // AssociatedResourceIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // DetailedStatus: to.Ptr(armnetworkcloud.TrunkedNetworkDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("Trunked network is up"), // InterfaceName: to.Ptr("eth0"), // IsolationDomainIDs: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"), // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")}, // ProvisioningState: to.Ptr(armnetworkcloud.TrunkedNetworkProvisioningStateSucceeded), // Vlans: []*int64{ // to.Ptr[int64](12), // to.Ptr[int64](14)}, // }, // } }
Output:
type TrunkedNetworksClientBeginCreateOrUpdateOptions ¶
type TrunkedNetworksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TrunkedNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the TrunkedNetworksClient.BeginCreateOrUpdate method.
type TrunkedNetworksClientBeginDeleteOptions ¶
type TrunkedNetworksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TrunkedNetworksClientBeginDeleteOptions contains the optional parameters for the TrunkedNetworksClient.BeginDelete method.
type TrunkedNetworksClientCreateOrUpdateResponse ¶
type TrunkedNetworksClientCreateOrUpdateResponse struct { // TrunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to create a trunked network. TrunkedNetwork }
TrunkedNetworksClientCreateOrUpdateResponse contains the response from method TrunkedNetworksClient.BeginCreateOrUpdate.
type TrunkedNetworksClientDeleteResponse ¶
type TrunkedNetworksClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
TrunkedNetworksClientDeleteResponse contains the response from method TrunkedNetworksClient.BeginDelete.
type TrunkedNetworksClientGetOptions ¶
type TrunkedNetworksClientGetOptions struct { }
TrunkedNetworksClientGetOptions contains the optional parameters for the TrunkedNetworksClient.Get method.
type TrunkedNetworksClientGetResponse ¶
type TrunkedNetworksClientGetResponse struct { // TrunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to create a trunked network. TrunkedNetwork }
TrunkedNetworksClientGetResponse contains the response from method TrunkedNetworksClient.Get.
type TrunkedNetworksClientListByResourceGroupOptions ¶
type TrunkedNetworksClientListByResourceGroupOptions struct { }
TrunkedNetworksClientListByResourceGroupOptions contains the optional parameters for the TrunkedNetworksClient.NewListByResourceGroupPager method.
type TrunkedNetworksClientListByResourceGroupResponse ¶
type TrunkedNetworksClientListByResourceGroupResponse struct { // TrunkedNetworkList represents a list of trunked networks. TrunkedNetworkList }
TrunkedNetworksClientListByResourceGroupResponse contains the response from method TrunkedNetworksClient.NewListByResourceGroupPager.
type TrunkedNetworksClientListBySubscriptionOptions ¶
type TrunkedNetworksClientListBySubscriptionOptions struct { }
TrunkedNetworksClientListBySubscriptionOptions contains the optional parameters for the TrunkedNetworksClient.NewListBySubscriptionPager method.
type TrunkedNetworksClientListBySubscriptionResponse ¶
type TrunkedNetworksClientListBySubscriptionResponse struct { // TrunkedNetworkList represents a list of trunked networks. TrunkedNetworkList }
TrunkedNetworksClientListBySubscriptionResponse contains the response from method TrunkedNetworksClient.NewListBySubscriptionPager.
type TrunkedNetworksClientUpdateOptions ¶
type TrunkedNetworksClientUpdateOptions struct { }
TrunkedNetworksClientUpdateOptions contains the optional parameters for the TrunkedNetworksClient.Update method.
type TrunkedNetworksClientUpdateResponse ¶
type TrunkedNetworksClientUpdateResponse struct { // TrunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to create a trunked network. TrunkedNetwork }
TrunkedNetworksClientUpdateResponse contains the response from method TrunkedNetworksClient.Update.
type UserAssignedIdentity ¶ added in v1.2.0
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the assigned identity. ClientID *string // READ-ONLY; The principal ID of the assigned identity. PrincipalID *string }
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶ added in v1.2.0
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶ added in v1.2.0
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type ValidationThreshold ¶
type ValidationThreshold struct { // REQUIRED; Selection of how the type evaluation is applied to the cluster calculation. Grouping *ValidationThresholdGrouping // REQUIRED; Selection of how the threshold should be evaluated. Type *ValidationThresholdType // REQUIRED; The numeric threshold value. Value *int64 }
ValidationThreshold indicates allowed machine and node hardware and deployment failures.
func (ValidationThreshold) MarshalJSON ¶
func (v ValidationThreshold) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ValidationThreshold.
func (*ValidationThreshold) UnmarshalJSON ¶
func (v *ValidationThreshold) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ValidationThreshold.
type ValidationThresholdGrouping ¶
type ValidationThresholdGrouping string
ValidationThresholdGrouping - Selection of how the type evaluation is applied to the cluster calculation.
const ( ValidationThresholdGroupingPerCluster ValidationThresholdGrouping = "PerCluster" ValidationThresholdGroupingPerRack ValidationThresholdGrouping = "PerRack" )
func PossibleValidationThresholdGroupingValues ¶
func PossibleValidationThresholdGroupingValues() []ValidationThresholdGrouping
PossibleValidationThresholdGroupingValues returns the possible values for the ValidationThresholdGrouping const type.
type ValidationThresholdType ¶
type ValidationThresholdType string
ValidationThresholdType - Selection of how the threshold should be evaluated.
const ( ValidationThresholdTypeCountSuccess ValidationThresholdType = "CountSuccess" ValidationThresholdTypePercentSuccess ValidationThresholdType = "PercentSuccess" )
func PossibleValidationThresholdTypeValues ¶
func PossibleValidationThresholdTypeValues() []ValidationThresholdType
PossibleValidationThresholdTypeValues returns the possible values for the ValidationThresholdType const type.
type VirtualMachine ¶
type VirtualMachine struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *VirtualMachineProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
VirtualMachine represents the on-premises Network Cloud virtual machine.
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 VirtualMachineBootMethod ¶
type VirtualMachineBootMethod string
VirtualMachineBootMethod - Selects the boot method for the virtual machine.
const ( VirtualMachineBootMethodBIOS VirtualMachineBootMethod = "BIOS" VirtualMachineBootMethodUEFI VirtualMachineBootMethod = "UEFI" )
func PossibleVirtualMachineBootMethodValues ¶
func PossibleVirtualMachineBootMethodValues() []VirtualMachineBootMethod
PossibleVirtualMachineBootMethodValues returns the possible values for the VirtualMachineBootMethod const type.
type VirtualMachineDetailedStatus ¶
type VirtualMachineDetailedStatus string
VirtualMachineDetailedStatus - The more detailed status of the virtual machine.
const ( VirtualMachineDetailedStatusAvailable VirtualMachineDetailedStatus = "Available" VirtualMachineDetailedStatusError VirtualMachineDetailedStatus = "Error" VirtualMachineDetailedStatusProvisioning VirtualMachineDetailedStatus = "Provisioning" VirtualMachineDetailedStatusRunning VirtualMachineDetailedStatus = "Running" VirtualMachineDetailedStatusScheduling VirtualMachineDetailedStatus = "Scheduling" VirtualMachineDetailedStatusStopped VirtualMachineDetailedStatus = "Stopped" VirtualMachineDetailedStatusTerminating VirtualMachineDetailedStatus = "Terminating" VirtualMachineDetailedStatusUnknown VirtualMachineDetailedStatus = "Unknown" )
func PossibleVirtualMachineDetailedStatusValues ¶
func PossibleVirtualMachineDetailedStatusValues() []VirtualMachineDetailedStatus
PossibleVirtualMachineDetailedStatusValues returns the possible values for the VirtualMachineDetailedStatus const type.
type VirtualMachineDeviceModelType ¶
type VirtualMachineDeviceModelType string
VirtualMachineDeviceModelType - The type of the device model to use.
const ( VirtualMachineDeviceModelTypeT1 VirtualMachineDeviceModelType = "T1" VirtualMachineDeviceModelTypeT2 VirtualMachineDeviceModelType = "T2" )
func PossibleVirtualMachineDeviceModelTypeValues ¶
func PossibleVirtualMachineDeviceModelTypeValues() []VirtualMachineDeviceModelType
PossibleVirtualMachineDeviceModelTypeValues returns the possible values for the VirtualMachineDeviceModelType const type.
type VirtualMachineIPAllocationMethod ¶
type VirtualMachineIPAllocationMethod string
VirtualMachineIPAllocationMethod - The IP allocation mechanism for the virtual machine. Dynamic and Static are only valid for l3Network which may also specify Disabled. Otherwise, Disabled is the only permitted value.
const ( VirtualMachineIPAllocationMethodDisabled VirtualMachineIPAllocationMethod = "Disabled" VirtualMachineIPAllocationMethodDynamic VirtualMachineIPAllocationMethod = "Dynamic" VirtualMachineIPAllocationMethodStatic VirtualMachineIPAllocationMethod = "Static" )
func PossibleVirtualMachineIPAllocationMethodValues ¶
func PossibleVirtualMachineIPAllocationMethodValues() []VirtualMachineIPAllocationMethod
PossibleVirtualMachineIPAllocationMethodValues returns the possible values for the VirtualMachineIPAllocationMethod const type.
type VirtualMachineIsolateEmulatorThread ¶
type VirtualMachineIsolateEmulatorThread string
VirtualMachineIsolateEmulatorThread - Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine.
const ( VirtualMachineIsolateEmulatorThreadFalse VirtualMachineIsolateEmulatorThread = "False" VirtualMachineIsolateEmulatorThreadTrue VirtualMachineIsolateEmulatorThread = "True" )
func PossibleVirtualMachineIsolateEmulatorThreadValues ¶
func PossibleVirtualMachineIsolateEmulatorThreadValues() []VirtualMachineIsolateEmulatorThread
PossibleVirtualMachineIsolateEmulatorThreadValues returns the possible values for the VirtualMachineIsolateEmulatorThread const type.
type VirtualMachineList ¶
type VirtualMachineList struct { // The link used to get the next page of operations. NextLink *string // The list of virtual machines. Value []*VirtualMachine }
VirtualMachineList represents a list of virtual machines.
func (VirtualMachineList) MarshalJSON ¶
func (v VirtualMachineList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineList.
func (*VirtualMachineList) UnmarshalJSON ¶
func (v *VirtualMachineList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineList.
type VirtualMachinePatchParameters ¶
type VirtualMachinePatchParameters struct { // The list of the resource properties. Properties *VirtualMachinePatchProperties // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
VirtualMachinePatchParameters represents the body of the request to patch the virtual machine.
func (VirtualMachinePatchParameters) MarshalJSON ¶
func (v VirtualMachinePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachinePatchParameters.
func (*VirtualMachinePatchParameters) UnmarshalJSON ¶
func (v *VirtualMachinePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePatchParameters.
type VirtualMachinePatchProperties ¶
type VirtualMachinePatchProperties struct { // The credentials used to login to the image repository that has access to the specified image. VMImageRepositoryCredentials *ImageRepositoryCredentials }
VirtualMachinePatchProperties represents the properties of the virtual machine that can be patched.
func (VirtualMachinePatchProperties) MarshalJSON ¶
func (v VirtualMachinePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachinePatchProperties.
func (*VirtualMachinePatchProperties) UnmarshalJSON ¶
func (v *VirtualMachinePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePatchProperties.
type VirtualMachinePlacementHint ¶
type VirtualMachinePlacementHint struct { // REQUIRED; The specification of whether this hint supports affinity or anti-affinity with the referenced resources. HintType *VirtualMachinePlacementHintType // REQUIRED; The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node // to host the virtual machine. ResourceID *string // REQUIRED; The indicator of whether the hint is a hard or soft requirement during scheduling. SchedulingExecution *VirtualMachineSchedulingExecution // REQUIRED; The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in // the case of node affinity. Scope *VirtualMachinePlacementHintPodAffinityScope }
VirtualMachinePlacementHint represents a single scheduling hint of the virtual machine.
func (VirtualMachinePlacementHint) MarshalJSON ¶
func (v VirtualMachinePlacementHint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachinePlacementHint.
func (*VirtualMachinePlacementHint) UnmarshalJSON ¶
func (v *VirtualMachinePlacementHint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePlacementHint.
type VirtualMachinePlacementHintPodAffinityScope ¶
type VirtualMachinePlacementHintPodAffinityScope string
VirtualMachinePlacementHintPodAffinityScope - The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.
const ( VirtualMachinePlacementHintPodAffinityScopeMachine VirtualMachinePlacementHintPodAffinityScope = "Machine" VirtualMachinePlacementHintPodAffinityScopeRack VirtualMachinePlacementHintPodAffinityScope = "Rack" )
func PossibleVirtualMachinePlacementHintPodAffinityScopeValues ¶
func PossibleVirtualMachinePlacementHintPodAffinityScopeValues() []VirtualMachinePlacementHintPodAffinityScope
PossibleVirtualMachinePlacementHintPodAffinityScopeValues returns the possible values for the VirtualMachinePlacementHintPodAffinityScope const type.
type VirtualMachinePlacementHintType ¶
type VirtualMachinePlacementHintType string
VirtualMachinePlacementHintType - The specification of whether this hint supports affinity or anti-affinity with the referenced resources.
const ( VirtualMachinePlacementHintTypeAffinity VirtualMachinePlacementHintType = "Affinity" VirtualMachinePlacementHintTypeAntiAffinity VirtualMachinePlacementHintType = "AntiAffinity" )
func PossibleVirtualMachinePlacementHintTypeValues ¶
func PossibleVirtualMachinePlacementHintTypeValues() []VirtualMachinePlacementHintType
PossibleVirtualMachinePlacementHintTypeValues returns the possible values for the VirtualMachinePlacementHintType const type.
type VirtualMachinePowerOffParameters ¶
type VirtualMachinePowerOffParameters struct { // The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately. SkipShutdown *SkipShutdown }
VirtualMachinePowerOffParameters represents the body of the request to power off virtual machine.
func (VirtualMachinePowerOffParameters) MarshalJSON ¶
func (v VirtualMachinePowerOffParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachinePowerOffParameters.
func (*VirtualMachinePowerOffParameters) UnmarshalJSON ¶
func (v *VirtualMachinePowerOffParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePowerOffParameters.
type VirtualMachinePowerState ¶
type VirtualMachinePowerState string
VirtualMachinePowerState - The power state of the virtual machine.
const ( VirtualMachinePowerStateOff VirtualMachinePowerState = "Off" VirtualMachinePowerStateOn VirtualMachinePowerState = "On" VirtualMachinePowerStateUnknown VirtualMachinePowerState = "Unknown" )
func PossibleVirtualMachinePowerStateValues ¶
func PossibleVirtualMachinePowerStateValues() []VirtualMachinePowerState
PossibleVirtualMachinePowerStateValues returns the possible values for the VirtualMachinePowerState const type.
type VirtualMachineProperties ¶
type VirtualMachineProperties struct { // REQUIRED; The name of the administrator to which the ssh public keys will be added into the authorized keys. AdminUsername *string // REQUIRED; The number of CPU cores in the virtual machine. CPUCores *int64 // REQUIRED; The cloud service network that provides platform-level services for the virtual machine. CloudServicesNetworkAttachment *NetworkAttachment // REQUIRED; The memory size of the virtual machine. Allocations are measured in gibibytes. MemorySizeGB *int64 // REQUIRED; The storage profile that specifies size and other parameters about the disks related to the virtual machine. StorageProfile *StorageProfile // REQUIRED; The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used // to pull the image. VMImage *string // Selects the boot method for the virtual machine. BootMethod *VirtualMachineBootMethod // Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated // to run the emulator thread for this virtual machine. IsolateEmulatorThread *VirtualMachineIsolateEmulatorThread // The list of network attachments to the virtual machine. NetworkAttachments []*NetworkAttachment // The Base64 encoded cloud-init network data. NetworkData *string // The scheduling hints for the virtual machine. PlacementHints []*VirtualMachinePlacementHint // The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init sshauthorizedkeys mechanism // for the adminUsername. SSHPublicKeys []*SSHPublicKey // The Base64 encoded cloud-init user data. UserData *string // The type of the device model to use. VMDeviceModel *VirtualMachineDeviceModelType // The credentials used to login to the image repository that has access to the specified image. VMImageRepositoryCredentials *ImageRepositoryCredentials // Field Deprecated, use virtualizationModel instead. The type of the virtio interface. VirtioInterface *VirtualMachineVirtioInterfaceType // READ-ONLY; The cluster availability zone containing this virtual machine. AvailabilityZone *string // READ-ONLY; The resource ID of the bare metal machine that hosts the virtual machine. BareMetalMachineID *string // READ-ONLY; The resource ID of the cluster the virtual machine is created for. ClusterID *string // READ-ONLY; The more detailed status of the virtual machine. DetailedStatus *VirtualMachineDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The power state of the virtual machine. PowerState *VirtualMachinePowerState // READ-ONLY; The provisioning state of the virtual machine. ProvisioningState *VirtualMachineProvisioningState // READ-ONLY; The resource IDs of volumes that are attached to the virtual machine. Volumes []*string }
VirtualMachineProperties represents the properties of the virtual machine.
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 VirtualMachineProvisioningState ¶
type VirtualMachineProvisioningState string
VirtualMachineProvisioningState - The provisioning state of the virtual machine.
const ( VirtualMachineProvisioningStateAccepted VirtualMachineProvisioningState = "Accepted" VirtualMachineProvisioningStateCanceled VirtualMachineProvisioningState = "Canceled" VirtualMachineProvisioningStateFailed VirtualMachineProvisioningState = "Failed" VirtualMachineProvisioningStateProvisioning VirtualMachineProvisioningState = "Provisioning" VirtualMachineProvisioningStateSucceeded VirtualMachineProvisioningState = "Succeeded" )
func PossibleVirtualMachineProvisioningStateValues ¶
func PossibleVirtualMachineProvisioningStateValues() []VirtualMachineProvisioningState
PossibleVirtualMachineProvisioningStateValues returns the possible values for the VirtualMachineProvisioningState const type.
type VirtualMachineSchedulingExecution ¶
type VirtualMachineSchedulingExecution string
VirtualMachineSchedulingExecution - The indicator of whether the hint is a hard or soft requirement during scheduling.
const ( VirtualMachineSchedulingExecutionHard VirtualMachineSchedulingExecution = "Hard" VirtualMachineSchedulingExecutionSoft VirtualMachineSchedulingExecution = "Soft" )
func PossibleVirtualMachineSchedulingExecutionValues ¶
func PossibleVirtualMachineSchedulingExecutionValues() []VirtualMachineSchedulingExecution
PossibleVirtualMachineSchedulingExecutionValues returns the possible values for the VirtualMachineSchedulingExecution const type.
type VirtualMachineVirtioInterfaceType ¶
type VirtualMachineVirtioInterfaceType string
VirtualMachineVirtioInterfaceType - Field Deprecated, use virtualizationModel instead. The type of the virtio interface.
const ( VirtualMachineVirtioInterfaceTypeModern VirtualMachineVirtioInterfaceType = "Modern" VirtualMachineVirtioInterfaceTypeTransitional VirtualMachineVirtioInterfaceType = "Transitional" )
func PossibleVirtualMachineVirtioInterfaceTypeValues ¶
func PossibleVirtualMachineVirtioInterfaceTypeValues() []VirtualMachineVirtioInterfaceType
PossibleVirtualMachineVirtioInterfaceTypeValues returns the possible values for the VirtualMachineVirtioInterfaceType const type.
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 ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachinesClient) BeginCreateOrUpdate ¶
func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, virtualMachineParameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new virtual machine or update the properties of the existing virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- virtualMachineParameters - The request body.
- options - VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "virtualMachineName", armnetworkcloud.VirtualMachine{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.VirtualMachineProperties{ AdminUsername: to.Ptr("username"), BootMethod: to.Ptr(armnetworkcloud.VirtualMachineBootMethodUEFI), CloudServicesNetworkAttachment: &armnetworkcloud.NetworkAttachment{ AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), }, CPUCores: to.Ptr[int64](2), MemorySizeGB: to.Ptr[int64](8), NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ { AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), IPv4Address: to.Ptr("198.51.100.1"), IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), NetworkAttachmentName: to.Ptr("netAttachName01"), }}, NetworkData: to.Ptr("bmV0d29ya0RhdGVTYW1wbGU="), PlacementHints: []*armnetworkcloud.VirtualMachinePlacementHint{ { HintType: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintTypeAffinity), ResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), SchedulingExecution: to.Ptr(armnetworkcloud.VirtualMachineSchedulingExecutionHard), Scope: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintPodAffinityScope("")), }}, SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), }}, StorageProfile: &armnetworkcloud.StorageProfile{ OSDisk: &armnetworkcloud.OsDisk{ CreateOption: to.Ptr(armnetworkcloud.OsDiskCreateOptionEphemeral), DeleteOption: to.Ptr(armnetworkcloud.OsDiskDeleteOptionDelete), DiskSizeGB: to.Ptr[int64](120), }, VolumeAttachments: []*string{ to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, }, UserData: to.Ptr("dXNlckRhdGVTYW1wbGU="), VMDeviceModel: to.Ptr(armnetworkcloud.VirtualMachineDeviceModelTypeT2), VMImage: to.Ptr("myacr.azurecr.io/foobar:latest"), VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ Password: to.Ptr("{password}"), RegistryURL: to.Ptr("myacr.azurecr.io"), Username: to.Ptr("myuser"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armnetworkcloud.VirtualMachine{ // Name: to.Ptr("virtualMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VirtualMachineProperties{ // AdminUsername: to.Ptr("username"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // BootMethod: to.Ptr(armnetworkcloud.VirtualMachineBootMethodUEFI), // CloudServicesNetworkAttachment: &armnetworkcloud.NetworkAttachment{ // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // }, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CPUCores: to.Ptr[int64](2), // DetailedStatus: to.Ptr(armnetworkcloud.VirtualMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("VM is up and healthy"), // MemorySizeGB: to.Ptr[int64](8), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("198.51.100.1"), // IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), // MacAddress: to.Ptr("bf:1c:29:31:31:1f"), // NetworkAttachmentName: to.Ptr("netAttachName01"), // }}, // NetworkData: to.Ptr("bmV0d29ya0RhdGVTYW1wbGU="), // PlacementHints: []*armnetworkcloud.VirtualMachinePlacementHint{ // { // HintType: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintTypeAffinity), // ResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SchedulingExecution: to.Ptr(armnetworkcloud.VirtualMachineSchedulingExecutionHard), // Scope: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintPodAffinityScope("")), // }}, // PowerState: to.Ptr(armnetworkcloud.VirtualMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.VirtualMachineProvisioningStateSucceeded), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // StorageProfile: &armnetworkcloud.StorageProfile{ // OSDisk: &armnetworkcloud.OsDisk{ // CreateOption: to.Ptr(armnetworkcloud.OsDiskCreateOptionEphemeral), // DeleteOption: to.Ptr(armnetworkcloud.OsDiskDeleteOptionDelete), // DiskSizeGB: to.Ptr[int64](120), // }, // VolumeAttachments: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // UserData: to.Ptr("dXNlckRhdGVTYW1wbGU="), // VMDeviceModel: to.Ptr(armnetworkcloud.VirtualMachineDeviceModelTypeT2), // VMImage: to.Ptr("myacr.azurecr.io/foobar:latest"), // VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ // RegistryURL: to.Ptr("myacr.azurecr.io"), // Username: to.Ptr("myuser"), // }, // Volumes: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // } }
Output:
func (*VirtualMachinesClient) BeginDelete ¶
func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
BeginDelete - Delete the provided virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginDelete(ctx, "resourceGroupName", "virtualMachineName", 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) BeginPowerOff ¶
func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginPowerOffOptions) (*runtime.Poller[VirtualMachinesClientPowerOffResponse], error)
BeginPowerOff - Power off the provided virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_PowerOff.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginPowerOff(ctx, "resourceGroupName", "virtualMachineName", &armnetworkcloud.VirtualMachinesClientBeginPowerOffOptions{VirtualMachinePowerOffParameters: &armnetworkcloud.VirtualMachinePowerOffParameters{ SkipShutdown: to.Ptr(armnetworkcloud.SkipShutdownTrue), }, }) 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) BeginReimage ¶
func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginReimageOptions) (*runtime.Poller[VirtualMachinesClientReimageResponse], error)
BeginReimage - Reimage the provided virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Reimage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginReimage(ctx, "resourceGroupName", "virtualMachineName", 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) BeginRestart ¶
func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginRestartOptions) (*runtime.Poller[VirtualMachinesClientRestartResponse], error)
BeginRestart - Restart the provided virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Restart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginRestart(ctx, "resourceGroupName", "virtualMachineName", 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 the provided virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Start.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginStart(ctx, "resourceGroupName", "virtualMachineName", 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) BeginUpdate ¶
func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, virtualMachineUpdateParameters VirtualMachinePatchParameters, options *VirtualMachinesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
BeginUpdate - Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- virtualMachineUpdateParameters - The request body.
- options - VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginUpdate(ctx, "resourceGroupName", "virtualMachineName", armnetworkcloud.VirtualMachinePatchParameters{ Properties: &armnetworkcloud.VirtualMachinePatchProperties{ VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ Password: to.Ptr("{password}"), RegistryURL: to.Ptr("myacr.azurecr.io"), Username: to.Ptr("myuser"), }, }, Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armnetworkcloud.VirtualMachine{ // Name: to.Ptr("virtualMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VirtualMachineProperties{ // AdminUsername: to.Ptr("username"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // BootMethod: to.Ptr(armnetworkcloud.VirtualMachineBootMethodUEFI), // CloudServicesNetworkAttachment: &armnetworkcloud.NetworkAttachment{ // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // }, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CPUCores: to.Ptr[int64](2), // DetailedStatus: to.Ptr(armnetworkcloud.VirtualMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("VM is up and healthy"), // MemorySizeGB: to.Ptr[int64](8), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("198.51.100.1"), // IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), // MacAddress: to.Ptr("bf:1c:29:31:31:1f"), // NetworkAttachmentName: to.Ptr("netAttachName01"), // }}, // NetworkData: to.Ptr("bmV0d29ya0RhdGVTYW1wbGU="), // PlacementHints: []*armnetworkcloud.VirtualMachinePlacementHint{ // { // HintType: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintTypeAffinity), // ResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SchedulingExecution: to.Ptr(armnetworkcloud.VirtualMachineSchedulingExecutionHard), // Scope: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintPodAffinityScope("")), // }}, // PowerState: to.Ptr(armnetworkcloud.VirtualMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.VirtualMachineProvisioningStateSucceeded), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // StorageProfile: &armnetworkcloud.StorageProfile{ // OSDisk: &armnetworkcloud.OsDisk{ // CreateOption: to.Ptr(armnetworkcloud.OsDiskCreateOptionEphemeral), // DeleteOption: to.Ptr(armnetworkcloud.OsDiskDeleteOptionDelete), // DiskSizeGB: to.Ptr[int64](120), // }, // VolumeAttachments: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // UserData: to.Ptr("dXNlckRhdGVTYW1wbGU="), // VMDeviceModel: to.Ptr(armnetworkcloud.VirtualMachineDeviceModelTypeT2), // VMImage: to.Ptr("myacr.azurecr.io/foobar:latest"), // VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ // RegistryURL: to.Ptr("myacr.azurecr.io"), // Username: to.Ptr("myuser"), // }, // Volumes: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // } }
Output:
func (*VirtualMachinesClient) Get ¶
func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error)
Get - Get properties of the provided virtual machine. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- virtualMachineName - The name of the virtual machine.
- options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachinesClient().Get(ctx, "resourceGroupName", "virtualMachineName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armnetworkcloud.VirtualMachine{ // Name: to.Ptr("virtualMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VirtualMachineProperties{ // AdminUsername: to.Ptr("username"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // BootMethod: to.Ptr(armnetworkcloud.VirtualMachineBootMethodUEFI), // CloudServicesNetworkAttachment: &armnetworkcloud.NetworkAttachment{ // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // }, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CPUCores: to.Ptr[int64](2), // DetailedStatus: to.Ptr(armnetworkcloud.VirtualMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("VM is up and healthy"), // MemorySizeGB: to.Ptr[int64](8), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("198.51.100.1"), // IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), // MacAddress: to.Ptr("bf:1c:29:31:31:1f"), // NetworkAttachmentName: to.Ptr("netAttachName01"), // }}, // NetworkData: to.Ptr("bmV0d29ya0RhdGVTYW1wbGU="), // PlacementHints: []*armnetworkcloud.VirtualMachinePlacementHint{ // { // HintType: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintTypeAffinity), // ResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SchedulingExecution: to.Ptr(armnetworkcloud.VirtualMachineSchedulingExecutionHard), // Scope: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintPodAffinityScope("")), // }}, // PowerState: to.Ptr(armnetworkcloud.VirtualMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.VirtualMachineProvisioningStateSucceeded), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // StorageProfile: &armnetworkcloud.StorageProfile{ // OSDisk: &armnetworkcloud.OsDisk{ // CreateOption: to.Ptr(armnetworkcloud.OsDiskCreateOptionEphemeral), // DeleteOption: to.Ptr(armnetworkcloud.OsDiskDeleteOptionDelete), // DiskSizeGB: to.Ptr[int64](120), // }, // VolumeAttachments: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // UserData: to.Ptr("dXNlckRhdGVTYW1wbGU="), // VMDeviceModel: to.Ptr(armnetworkcloud.VirtualMachineDeviceModelTypeT2), // VMImage: to.Ptr("myacr.azurecr.io/foobar:latest"), // VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ // RegistryURL: to.Ptr("myacr.azurecr.io"), // Username: to.Ptr("myuser"), // }, // Volumes: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // } }
Output:
func (*VirtualMachinesClient) NewListByResourceGroupPager ¶
func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachinesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of virtual machines in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachinesClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualMachineList = armnetworkcloud.VirtualMachineList{ // Value: []*armnetworkcloud.VirtualMachine{ // { // Name: to.Ptr("virtualMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VirtualMachineProperties{ // AdminUsername: to.Ptr("username"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // BootMethod: to.Ptr(armnetworkcloud.VirtualMachineBootMethodUEFI), // CloudServicesNetworkAttachment: &armnetworkcloud.NetworkAttachment{ // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // }, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CPUCores: to.Ptr[int64](2), // DetailedStatus: to.Ptr(armnetworkcloud.VirtualMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("VM is up and healthy"), // MemorySizeGB: to.Ptr[int64](8), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("198.51.100.1"), // IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), // MacAddress: to.Ptr("bf:1c:29:31:31:1f"), // NetworkAttachmentName: to.Ptr("netAttachName01"), // }}, // NetworkData: to.Ptr("bmV0d29ya0RhdGVTYW1wbGU="), // PlacementHints: []*armnetworkcloud.VirtualMachinePlacementHint{ // { // HintType: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintTypeAffinity), // ResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SchedulingExecution: to.Ptr(armnetworkcloud.VirtualMachineSchedulingExecutionHard), // Scope: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintPodAffinityScope("")), // }}, // PowerState: to.Ptr(armnetworkcloud.VirtualMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.VirtualMachineProvisioningStateSucceeded), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // StorageProfile: &armnetworkcloud.StorageProfile{ // OSDisk: &armnetworkcloud.OsDisk{ // CreateOption: to.Ptr(armnetworkcloud.OsDiskCreateOptionEphemeral), // DeleteOption: to.Ptr(armnetworkcloud.OsDiskDeleteOptionDelete), // DiskSizeGB: to.Ptr[int64](120), // }, // VolumeAttachments: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // UserData: to.Ptr("dXNlckRhdGVTYW1wbGU="), // VMDeviceModel: to.Ptr(armnetworkcloud.VirtualMachineDeviceModelTypeT2), // VMImage: to.Ptr("myacr.azurecr.io/foobar:latest"), // VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ // RegistryURL: to.Ptr("myacr.azurecr.io"), // Username: to.Ptr("myuser"), // }, // Volumes: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // }}, // } } }
Output:
func (*VirtualMachinesClient) NewListBySubscriptionPager ¶
func (client *VirtualMachinesClient) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of virtual machines in the provided subscription.
Generated from API version 2024-07-01
- options - VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/VirtualMachines_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachinesClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualMachineList = armnetworkcloud.VirtualMachineList{ // Value: []*armnetworkcloud.VirtualMachine{ // { // Name: to.Ptr("virtualMachineName"), // Type: to.Ptr("Microsoft.NetworkCloud/virtualMachines"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VirtualMachineProperties{ // AdminUsername: to.Ptr("username"), // AvailabilityZone: to.Ptr("1"), // BareMetalMachineID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/bareMetalMachines/bareMetalMachineName"), // BootMethod: to.Ptr(armnetworkcloud.VirtualMachineBootMethodUEFI), // CloudServicesNetworkAttachment: &armnetworkcloud.NetworkAttachment{ // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // }, // ClusterID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/clusters/clusterName"), // CPUCores: to.Ptr[int64](2), // DetailedStatus: to.Ptr(armnetworkcloud.VirtualMachineDetailedStatusAvailable), // DetailedStatusMessage: to.Ptr("VM is up and healthy"), // MemorySizeGB: to.Ptr[int64](8), // NetworkAttachments: []*armnetworkcloud.NetworkAttachment{ // { // AttachedNetworkID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"), // DefaultGateway: to.Ptr(armnetworkcloud.DefaultGatewayTrue), // IPAllocationMethod: to.Ptr(armnetworkcloud.VirtualMachineIPAllocationMethodDynamic), // IPv4Address: to.Ptr("198.51.100.1"), // IPv6Address: to.Ptr("2001:0db8:0000:0000:0000:0000:0000:0000"), // MacAddress: to.Ptr("bf:1c:29:31:31:1f"), // NetworkAttachmentName: to.Ptr("netAttachName01"), // }}, // NetworkData: to.Ptr("bmV0d29ya0RhdGVTYW1wbGU="), // PlacementHints: []*armnetworkcloud.VirtualMachinePlacementHint{ // { // HintType: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintTypeAffinity), // ResourceID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName"), // SchedulingExecution: to.Ptr(armnetworkcloud.VirtualMachineSchedulingExecutionHard), // Scope: to.Ptr(armnetworkcloud.VirtualMachinePlacementHintPodAffinityScope("")), // }}, // PowerState: to.Ptr(armnetworkcloud.VirtualMachinePowerStateOn), // ProvisioningState: to.Ptr(armnetworkcloud.VirtualMachineProvisioningStateSucceeded), // SSHPublicKeys: []*armnetworkcloud.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"), // }}, // StorageProfile: &armnetworkcloud.StorageProfile{ // OSDisk: &armnetworkcloud.OsDisk{ // CreateOption: to.Ptr(armnetworkcloud.OsDiskCreateOptionEphemeral), // DeleteOption: to.Ptr(armnetworkcloud.OsDiskDeleteOptionDelete), // DiskSizeGB: to.Ptr[int64](120), // }, // VolumeAttachments: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // UserData: to.Ptr("dXNlckRhdGVTYW1wbGU="), // VMDeviceModel: to.Ptr(armnetworkcloud.VirtualMachineDeviceModelTypeT2), // VMImage: to.Ptr("myacr.azurecr.io/foobar:latest"), // VMImageRepositoryCredentials: &armnetworkcloud.ImageRepositoryCredentials{ // RegistryURL: to.Ptr("myacr.azurecr.io"), // Username: to.Ptr("myuser"), // }, // Volumes: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName")}, // }, // }}, // } } }
Output:
type VirtualMachinesClientBeginCreateOrUpdateOptions ¶
type VirtualMachinesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.
type VirtualMachinesClientBeginDeleteOptions ¶
type VirtualMachinesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
type VirtualMachinesClientBeginPowerOffOptions ¶
type VirtualMachinesClientBeginPowerOffOptions struct { // Resumes the LRO from the provided token. ResumeToken string // The request body. VirtualMachinePowerOffParameters *VirtualMachinePowerOffParameters }
VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff method.
type VirtualMachinesClientBeginReimageOptions ¶
type VirtualMachinesClientBeginReimageOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage 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 VirtualMachinesClientBeginUpdateOptions ¶
type VirtualMachinesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
type VirtualMachinesClientCreateOrUpdateResponse ¶
type VirtualMachinesClientCreateOrUpdateResponse struct { // VirtualMachine represents the on-premises Network Cloud virtual machine. VirtualMachine }
VirtualMachinesClientCreateOrUpdateResponse contains the response from method VirtualMachinesClient.BeginCreateOrUpdate.
type VirtualMachinesClientDeleteResponse ¶
type VirtualMachinesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.BeginDelete.
type VirtualMachinesClientGetOptions ¶
type VirtualMachinesClientGetOptions struct { }
VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
type VirtualMachinesClientGetResponse ¶
type VirtualMachinesClientGetResponse struct { // VirtualMachine represents the on-premises Network Cloud virtual machine. VirtualMachine }
VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.
type VirtualMachinesClientListByResourceGroupOptions ¶
type VirtualMachinesClientListByResourceGroupOptions struct { }
VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.NewListByResourceGroupPager method.
type VirtualMachinesClientListByResourceGroupResponse ¶
type VirtualMachinesClientListByResourceGroupResponse struct { // VirtualMachineList represents a list of virtual machines. VirtualMachineList }
VirtualMachinesClientListByResourceGroupResponse contains the response from method VirtualMachinesClient.NewListByResourceGroupPager.
type VirtualMachinesClientListBySubscriptionOptions ¶
type VirtualMachinesClientListBySubscriptionOptions struct { }
VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.NewListBySubscriptionPager method.
type VirtualMachinesClientListBySubscriptionResponse ¶
type VirtualMachinesClientListBySubscriptionResponse struct { // VirtualMachineList represents a list of virtual machines. VirtualMachineList }
VirtualMachinesClientListBySubscriptionResponse contains the response from method VirtualMachinesClient.NewListBySubscriptionPager.
type VirtualMachinesClientPowerOffResponse ¶
type VirtualMachinesClientPowerOffResponse struct { // The current status of an async operation. OperationStatusResult }
VirtualMachinesClientPowerOffResponse contains the response from method VirtualMachinesClient.BeginPowerOff.
type VirtualMachinesClientReimageResponse ¶
type VirtualMachinesClientReimageResponse struct { // The current status of an async operation. OperationStatusResult }
VirtualMachinesClientReimageResponse contains the response from method VirtualMachinesClient.BeginReimage.
type VirtualMachinesClientRestartResponse ¶
type VirtualMachinesClientRestartResponse struct { // The current status of an async operation. OperationStatusResult }
VirtualMachinesClientRestartResponse contains the response from method VirtualMachinesClient.BeginRestart.
type VirtualMachinesClientStartResponse ¶
type VirtualMachinesClientStartResponse struct { // The current status of an async operation. OperationStatusResult }
VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.BeginStart.
type VirtualMachinesClientUpdateResponse ¶
type VirtualMachinesClientUpdateResponse struct { // VirtualMachine represents the on-premises Network Cloud virtual machine. VirtualMachine }
VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.BeginUpdate.
type Volume ¶
type Volume struct { // REQUIRED; The extended location of the cluster associated with the resource. ExtendedLocation *ExtendedLocation // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The list of the resource properties. Properties *VolumeProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Volume represents storage made available for use by resources running on the cluster.
func (Volume) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Volume.
func (*Volume) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Volume.
type VolumeDetailedStatus ¶
type VolumeDetailedStatus string
VolumeDetailedStatus - The more detailed status of the volume.
const ( VolumeDetailedStatusActive VolumeDetailedStatus = "Active" VolumeDetailedStatusError VolumeDetailedStatus = "Error" VolumeDetailedStatusProvisioning VolumeDetailedStatus = "Provisioning" )
func PossibleVolumeDetailedStatusValues ¶
func PossibleVolumeDetailedStatusValues() []VolumeDetailedStatus
PossibleVolumeDetailedStatusValues returns the possible values for the VolumeDetailedStatus const type.
type VolumeList ¶
type VolumeList struct { // The link used to get the next page of operations. NextLink *string // The list of volumes. Value []*Volume }
VolumeList represents a list of volumes.
func (VolumeList) MarshalJSON ¶
func (v VolumeList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeList.
func (*VolumeList) UnmarshalJSON ¶
func (v *VolumeList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeList.
type VolumePatchParameters ¶
type VolumePatchParameters struct { // The Azure resource tags that will replace the existing ones. Tags map[string]*string }
VolumePatchParameters represents the body of the request to patch the volume resource.
func (VolumePatchParameters) MarshalJSON ¶
func (v VolumePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumePatchParameters.
func (*VolumePatchParameters) UnmarshalJSON ¶
func (v *VolumePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumePatchParameters.
type VolumeProperties ¶
type VolumeProperties struct { // REQUIRED; The size of the allocation for this volume in Mebibytes. SizeMiB *int64 // READ-ONLY; The list of resource IDs that attach the volume. It may include virtual machines and Hybrid AKS clusters. AttachedTo []*string // READ-ONLY; The more detailed status of the volume. DetailedStatus *VolumeDetailedStatus // READ-ONLY; The descriptive message about the current detailed status. DetailedStatusMessage *string // READ-ONLY; The provisioning state of the volume. ProvisioningState *VolumeProvisioningState // READ-ONLY; The unique identifier of the volume. SerialNumber *string }
VolumeProperties represents properties of the volume resource.
func (VolumeProperties) MarshalJSON ¶
func (v VolumeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeProperties.
func (*VolumeProperties) UnmarshalJSON ¶
func (v *VolumeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeProperties.
type VolumeProvisioningState ¶
type VolumeProvisioningState string
VolumeProvisioningState - The provisioning state of the volume.
const ( VolumeProvisioningStateAccepted VolumeProvisioningState = "Accepted" VolumeProvisioningStateCanceled VolumeProvisioningState = "Canceled" VolumeProvisioningStateFailed VolumeProvisioningState = "Failed" VolumeProvisioningStateProvisioning VolumeProvisioningState = "Provisioning" VolumeProvisioningStateSucceeded VolumeProvisioningState = "Succeeded" )
func PossibleVolumeProvisioningStateValues ¶
func PossibleVolumeProvisioningStateValues() []VolumeProvisioningState
PossibleVolumeProvisioningStateValues returns the possible values for the VolumeProvisioningState const type.
type VolumesClient ¶
type VolumesClient struct {
// contains filtered or unexported fields
}
VolumesClient contains the methods for the Volumes group. Don't use this type directly, use NewVolumesClient() instead.
func NewVolumesClient ¶
func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumesClient, error)
NewVolumesClient creates a new instance of VolumesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VolumesClient) BeginCreateOrUpdate ¶
func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, volumeName string, volumeParameters Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VolumesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new volume or update the properties of the existing one. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- volumeName - The name of the volume.
- volumeParameters - The request body.
- options - VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Volumes_Create.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVolumesClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "volumeName", armnetworkcloud.Volume{ Location: to.Ptr("location"), Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, ExtendedLocation: &armnetworkcloud.ExtendedLocation{ Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), Type: to.Ptr("CustomLocation"), }, Properties: &armnetworkcloud.VolumeProperties{ SizeMiB: to.Ptr[int64](10000), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Volume = armnetworkcloud.Volume{ // Name: to.Ptr("volumeName"), // Type: to.Ptr("Microsoft.NetworkCloud/volumes"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VolumeProperties{ // AttachedTo: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // DetailedStatus: to.Ptr(armnetworkcloud.VolumeDetailedStatusActive), // DetailedStatusMessage: to.Ptr("Volume is available"), // ProvisioningState: to.Ptr(armnetworkcloud.VolumeProvisioningStateSucceeded), // SerialNumber: to.Ptr("XXXX-XXXX-XXXX-XXXX"), // SizeMiB: to.Ptr[int64](10000), // }, // } }
Output:
func (*VolumesClient) BeginDelete ¶
func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*runtime.Poller[VolumesClientDeleteResponse], error)
BeginDelete - Delete the provided volume. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- volumeName - The name of the volume.
- options - VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Volumes_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVolumesClient().BeginDelete(ctx, "resourceGroupName", "volumeName", 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 (*VolumesClient) Get ¶
func (client *VolumesClient) Get(ctx context.Context, resourceGroupName string, volumeName string, options *VolumesClientGetOptions) (VolumesClientGetResponse, error)
Get - Get properties of the provided volume. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- volumeName - The name of the volume.
- options - VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Volumes_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVolumesClient().Get(ctx, "resourceGroupName", "volumeName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Volume = armnetworkcloud.Volume{ // Name: to.Ptr("volumeName"), // Type: to.Ptr("Microsoft.NetworkCloud/volumes"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VolumeProperties{ // AttachedTo: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // DetailedStatus: to.Ptr(armnetworkcloud.VolumeDetailedStatusActive), // DetailedStatusMessage: to.Ptr("Volume is available"), // ProvisioningState: to.Ptr(armnetworkcloud.VolumeProvisioningStateSucceeded), // SerialNumber: to.Ptr("XXXX-XXXX-XXXX-XXXX"), // SizeMiB: to.Ptr[int64](10000), // }, // } }
Output:
func (*VolumesClient) NewListByResourceGroupPager ¶
func (client *VolumesClient) NewListByResourceGroupPager(resourceGroupName string, options *VolumesClientListByResourceGroupOptions) *runtime.Pager[VolumesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of volumes in the provided resource group.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - VolumesClientListByResourceGroupOptions contains the optional parameters for the VolumesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Volumes_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVolumesClient().NewListByResourceGroupPager("resourceGroupName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VolumeList = armnetworkcloud.VolumeList{ // Value: []*armnetworkcloud.Volume{ // { // Name: to.Ptr("volumeName"), // Type: to.Ptr("Microsoft.NetworkCloud/volumes"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VolumeProperties{ // AttachedTo: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // DetailedStatus: to.Ptr(armnetworkcloud.VolumeDetailedStatusActive), // DetailedStatusMessage: to.Ptr("Volume is available"), // ProvisioningState: to.Ptr(armnetworkcloud.VolumeProvisioningStateSucceeded), // SerialNumber: to.Ptr("XXXX-XXXX-XXXX-XXXX"), // SizeMiB: to.Ptr[int64](10000), // }, // }}, // } } }
Output:
func (*VolumesClient) NewListBySubscriptionPager ¶
func (client *VolumesClient) NewListBySubscriptionPager(options *VolumesClientListBySubscriptionOptions) *runtime.Pager[VolumesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get a list of volumes in the provided subscription.
Generated from API version 2024-07-01
- options - VolumesClientListBySubscriptionOptions contains the optional parameters for the VolumesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Volumes_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVolumesClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VolumeList = armnetworkcloud.VolumeList{ // Value: []*armnetworkcloud.Volume{ // { // Name: to.Ptr("volumeName"), // Type: to.Ptr("Microsoft.NetworkCloud/volumes"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VolumeProperties{ // AttachedTo: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // DetailedStatus: to.Ptr(armnetworkcloud.VolumeDetailedStatusActive), // DetailedStatusMessage: to.Ptr("Volume is available"), // ProvisioningState: to.Ptr(armnetworkcloud.VolumeProvisioningStateSucceeded), // SerialNumber: to.Ptr("XXXX-XXXX-XXXX-XXXX"), // SizeMiB: to.Ptr[int64](10000), // }, // }}, // } } }
Output:
func (*VolumesClient) Update ¶
func (client *VolumesClient) Update(ctx context.Context, resourceGroupName string, volumeName string, volumeUpdateParameters VolumePatchParameters, options *VolumesClientUpdateOptions) (VolumesClientUpdateResponse, error)
Update - Update tags associated with the provided volume. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- volumeName - The name of the volume.
- volumeUpdateParameters - The request body.
- options - VolumesClientUpdateOptions contains the optional parameters for the VolumesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c0a12a75b702054cf1e7fcd8c014d0fc116dea6e/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2024-07-01/examples/Volumes_Patch.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/networkcloud/armnetworkcloud" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnetworkcloud.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVolumesClient().Update(ctx, "resourceGroupName", "volumeName", armnetworkcloud.VolumePatchParameters{ Tags: map[string]*string{ "key1": to.Ptr("myvalue1"), "key2": to.Ptr("myvalue2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Volume = armnetworkcloud.Volume{ // Name: to.Ptr("volumeName"), // Type: to.Ptr("Microsoft.NetworkCloud/volumes"), // ID: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName"), // SystemData: &armnetworkcloud.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:27:03.008Z"); return t}()), // CreatedBy: to.Ptr("identityA"), // CreatedByType: to.Ptr(armnetworkcloud.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-22T13:29:03.001Z"); return t}()), // LastModifiedBy: to.Ptr("identityB"), // LastModifiedByType: to.Ptr(armnetworkcloud.CreatedByTypeUser), // }, // Location: to.Ptr("location"), // Tags: map[string]*string{ // "key1": to.Ptr("myvalue1"), // "key2": to.Ptr("myvalue2"), // }, // ExtendedLocation: &armnetworkcloud.ExtendedLocation{ // Name: to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"), // Type: to.Ptr("CustomLocation"), // }, // Properties: &armnetworkcloud.VolumeProperties{ // AttachedTo: []*string{ // to.Ptr("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName")}, // DetailedStatus: to.Ptr(armnetworkcloud.VolumeDetailedStatusActive), // DetailedStatusMessage: to.Ptr("Volume is available"), // ProvisioningState: to.Ptr(armnetworkcloud.VolumeProvisioningStateSucceeded), // SerialNumber: to.Ptr("XXXX-XXXX-XXXX-XXXX"), // SizeMiB: to.Ptr[int64](10000), // }, // } }
Output:
type VolumesClientBeginCreateOrUpdateOptions ¶
type VolumesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate method.
type VolumesClientBeginDeleteOptions ¶
type VolumesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method.
type VolumesClientCreateOrUpdateResponse ¶
type VolumesClientCreateOrUpdateResponse struct { // Volume represents storage made available for use by resources running on the cluster. Volume }
VolumesClientCreateOrUpdateResponse contains the response from method VolumesClient.BeginCreateOrUpdate.
type VolumesClientDeleteResponse ¶
type VolumesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
VolumesClientDeleteResponse contains the response from method VolumesClient.BeginDelete.
type VolumesClientGetOptions ¶
type VolumesClientGetOptions struct { }
VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method.
type VolumesClientGetResponse ¶
type VolumesClientGetResponse struct { // Volume represents storage made available for use by resources running on the cluster. Volume }
VolumesClientGetResponse contains the response from method VolumesClient.Get.
type VolumesClientListByResourceGroupOptions ¶
type VolumesClientListByResourceGroupOptions struct { }
VolumesClientListByResourceGroupOptions contains the optional parameters for the VolumesClient.NewListByResourceGroupPager method.
type VolumesClientListByResourceGroupResponse ¶
type VolumesClientListByResourceGroupResponse struct { // VolumeList represents a list of volumes. VolumeList }
VolumesClientListByResourceGroupResponse contains the response from method VolumesClient.NewListByResourceGroupPager.
type VolumesClientListBySubscriptionOptions ¶
type VolumesClientListBySubscriptionOptions struct { }
VolumesClientListBySubscriptionOptions contains the optional parameters for the VolumesClient.NewListBySubscriptionPager method.
type VolumesClientListBySubscriptionResponse ¶
type VolumesClientListBySubscriptionResponse struct { // VolumeList represents a list of volumes. VolumeList }
VolumesClientListBySubscriptionResponse contains the response from method VolumesClient.NewListBySubscriptionPager.
type VolumesClientUpdateOptions ¶
type VolumesClientUpdateOptions struct { }
VolumesClientUpdateOptions contains the optional parameters for the VolumesClient.Update method.
type VolumesClientUpdateResponse ¶
type VolumesClientUpdateResponse struct { // Volume represents storage made available for use by resources running on the cluster. Volume }
VolumesClientUpdateResponse contains the response from method VolumesClient.Update.
type WorkloadImpact ¶
type WorkloadImpact string
WorkloadImpact - The indicator of whether the workload will be impacted during the upgrade.
const ( WorkloadImpactFalse WorkloadImpact = "False" WorkloadImpactTrue WorkloadImpact = "True" )
func PossibleWorkloadImpactValues ¶
func PossibleWorkloadImpactValues() []WorkloadImpact
PossibleWorkloadImpactValues returns the possible values for the WorkloadImpact const type.
Source Files
¶
- agentpools_client.go
- baremetalmachinekeysets_client.go
- baremetalmachines_client.go
- bmckeysets_client.go
- build.go
- client_factory.go
- cloudservicesnetworks_client.go
- clustermanagers_client.go
- clusters_client.go
- consoles_client.go
- constants.go
- kubernetesclusterfeatures_client.go
- kubernetesclusters_client.go
- l2networks_client.go
- l3networks_client.go
- metricsconfigurations_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- racks_client.go
- rackskus_client.go
- responses.go
- storageappliances_client.go
- time_rfc3339.go
- trunkednetworks_client.go
- virtualmachines_client.go
- volumes_client.go