Пример #1
0
 /// <summary>
 /// Validate if a storageAccount configuration exists for a subscription used
 /// for DiskInspection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location used to execute the diagnostic operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StorageConfigurationResponse> ValidateAsync(this IDiskInspectionStorageConfigurationOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateWithHttpMessagesAsync(location, 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);
     CapacityReservationGroups             = new CapacityReservationGroupsOperations(this);
     CapacityReservations                  = new CapacityReservationsOperations(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);
     CommunityGalleries                    = new CommunityGalleriesOperations(this);
     CommunityGalleryImages                = new CommunityGalleryImagesOperations(this);
     CommunityGalleryImageVersions         = new CommunityGalleryImageVersionsOperations(this);
     CloudServiceRoleInstances             = new CloudServiceRoleInstancesOperations(this);
     CloudServiceRoles                     = new CloudServiceRolesOperations(this);
     CloudServices                         = new CloudServicesOperations(this);
     CloudServicesUpdateDomain             = new CloudServicesUpdateDomainOperations(this);
     CloudServiceOperatingSystems          = new CloudServiceOperatingSystemsOperations(this);
     DiagnosticOperations                  = new DiagnosticOperations(this);
     DiskInspection                        = new DiskInspectionOperations(this);
     Diagnostics                           = new DiagnosticsOperations(this);
     DiskInspectionStorageConfiguration    = new DiskInspectionStorageConfigurationOperations(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());
 }
Пример #3
0
 /// <summary>
 /// Register a storageAccount for a subscription used for DiskInspection
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location used to execute the diagnostic operation.
 /// </param>
 /// <param name='storageAccountId'>
 /// Qualified name of the storage account
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RegisterAsync(this IDiskInspectionStorageConfigurationOperations operations, string location, string storageAccountId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RegisterWithHttpMessagesAsync(location, storageAccountId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #4
0
 /// <summary>
 /// Validate if a storageAccount configuration exists for a subscription used
 /// for DiskInspection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location used to execute the diagnostic operation.
 /// </param>
 public static StorageConfigurationResponse Validate(this IDiskInspectionStorageConfigurationOperations operations, string location)
 {
     return(operations.ValidateAsync(location).GetAwaiter().GetResult());
 }
Пример #5
0
 /// <summary>
 /// Register a storageAccount for a subscription used for DiskInspection
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The location used to execute the diagnostic operation.
 /// </param>
 /// <param name='storageAccountId'>
 /// Qualified name of the storage account
 /// </param>
 public static void Register(this IDiskInspectionStorageConfigurationOperations operations, string location, string storageAccountId)
 {
     operations.RegisterAsync(location, storageAccountId).GetAwaiter().GetResult();
 }