/// <summary> /// Gets a list of all guest operating system families available to be /// specified in the XML service configuration (.cscfg) for a cloud service. /// Use nextLink property in the response to get the next page of OS Families. /// Do this till nextLink is null to fetch all the OS Families. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <OSFamily> > ListOSFamiliesNextAsync(this ICloudServiceOperatingSystemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListOSFamiliesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of all guest operating system versions available to be /// specified in the XML service configuration (.cscfg) for a cloud service. /// Use nextLink property in the response to get the next page of OS versions. /// Do this till nextLink is null to fetch all the OS versions. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Name of the location that the OS versions pertain to. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <OSVersion> > ListOSVersionsAsync(this ICloudServiceOperatingSystemsOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListOSVersionsWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets properties of a guest operating system family that can be specified in /// the XML service configuration (.cscfg) for a cloud service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Name of the location that the OS family pertains to. /// </param> /// <param name='osFamilyName'> /// Name of the OS family. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OSFamily> GetOSFamilyAsync(this ICloudServiceOperatingSystemsOperations operations, string location, string osFamilyName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetOSFamilyWithHttpMessagesAsync(location, osFamilyName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); AvailabilitySets = new AvailabilitySetsOperations(this); ProximityPlacementGroups = new ProximityPlacementGroupsOperations(this); DedicatedHostGroups = new DedicatedHostGroupsOperations(this); DedicatedHosts = new DedicatedHostsOperations(this); SshPublicKeys = new SshPublicKeysOperations(this); VirtualMachineExtensionImages = new VirtualMachineExtensionImagesOperations(this); VirtualMachineExtensions = new VirtualMachineExtensionsOperations(this); VirtualMachineImages = new VirtualMachineImagesOperations(this); VirtualMachineImagesEdgeZone = new VirtualMachineImagesEdgeZoneOperations(this); Usage = new UsageOperations(this); VirtualMachines = new VirtualMachinesOperations(this); VirtualMachineScaleSets = new VirtualMachineScaleSetsOperations(this); VirtualMachineSizes = new VirtualMachineSizesOperations(this); Images = new ImagesOperations(this); RestorePointCollections = new RestorePointCollectionsOperations(this); RestorePoints = new RestorePointsOperations(this); VirtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsOperations(this); VirtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesOperations(this); VirtualMachineScaleSetVMExtensions = new VirtualMachineScaleSetVMExtensionsOperations(this); VirtualMachineScaleSetVMs = new VirtualMachineScaleSetVMsOperations(this); LogAnalytics = new LogAnalyticsOperations(this); VirtualMachineRunCommands = new VirtualMachineRunCommandsOperations(this); VirtualMachineScaleSetVMRunCommands = new VirtualMachineScaleSetVMRunCommandsOperations(this); ResourceSkus = new ResourceSkusOperations(this); Disks = new DisksOperations(this); Snapshots = new SnapshotsOperations(this); DiskEncryptionSets = new DiskEncryptionSetsOperations(this); DiskAccesses = new DiskAccessesOperations(this); DiskRestorePoint = new DiskRestorePointOperations(this); Galleries = new GalleriesOperations(this); GalleryImages = new GalleryImagesOperations(this); GalleryImageVersions = new GalleryImageVersionsOperations(this); GalleryApplications = new GalleryApplicationsOperations(this); GalleryApplicationVersions = new GalleryApplicationVersionsOperations(this); GallerySharingProfile = new GallerySharingProfileOperations(this); SharedGalleries = new SharedGalleriesOperations(this); SharedGalleryImages = new SharedGalleryImagesOperations(this); SharedGalleryImageVersions = new SharedGalleryImageVersionsOperations(this); CloudServiceRoleInstances = new CloudServiceRoleInstancesOperations(this); CloudServiceRoles = new CloudServiceRolesOperations(this); CloudServices = new CloudServicesOperations(this); CloudServicesUpdateDomain = new CloudServicesUpdateDomainOperations(this); CloudServiceOperatingSystems = new CloudServiceOperatingSystemsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Gets a list of all guest operating system versions available to be /// specified in the XML service configuration (.cscfg) for a cloud service. /// Use nextLink property in the response to get the next page of OS versions. /// Do this till nextLink is null to fetch all the OS versions. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Name of the location that the OS versions pertain to. /// </param> public static IPage <OSVersion> ListOSVersions(this ICloudServiceOperatingSystemsOperations operations, string location) { return(operations.ListOSVersionsAsync(location).GetAwaiter().GetResult()); }
/// <summary> /// Gets properties of a guest operating system version that can be specified /// in the XML service configuration (.cscfg) for a cloud service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Name of the location that the OS version pertains to. /// </param> /// <param name='osVersionName'> /// Name of the OS version. /// </param> public static OSVersion GetOSVersion(this ICloudServiceOperatingSystemsOperations operations, string location, string osVersionName) { return(operations.GetOSVersionAsync(location, osVersionName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of all guest operating system families available to be /// specified in the XML service configuration (.cscfg) for a cloud service. /// Use nextLink property in the response to get the next page of OS Families. /// Do this till nextLink is null to fetch all the OS Families. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <OSFamily> ListOSFamiliesNext(this ICloudServiceOperatingSystemsOperations operations, string nextPageLink) { return(operations.ListOSFamiliesNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets properties of a guest operating system family that can be specified in /// the XML service configuration (.cscfg) for a cloud service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Name of the location that the OS family pertains to. /// </param> /// <param name='osFamilyName'> /// Name of the OS family. /// </param> public static OSFamily GetOSFamily(this ICloudServiceOperatingSystemsOperations operations, string location, string osFamilyName) { return(operations.GetOSFamilyAsync(location, osFamilyName).GetAwaiter().GetResult()); }