Esempio n. 1
0
 public static async Task <ContainerServiceInner> GetAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public static async Task <IPage <ContainerServiceModel> > ListAsync(this IContainerServicesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public static async Task <ContainerServiceModel> BeginCreateOrUpdateAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerServiceName, parameters, 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);
     VirtualMachineExtensionImages = new VirtualMachineExtensionImagesOperations(this);
     VirtualMachineExtensions      = new VirtualMachineExtensionsOperations(this);
     VirtualMachineImages          = new VirtualMachineImagesOperations(this);
     Usage                                 = new UsageOperations(this);
     VirtualMachines                       = new VirtualMachinesOperations(this);
     VirtualMachineSizes                   = new VirtualMachineSizesOperations(this);
     Images                                = new ImagesOperations(this);
     VirtualMachineScaleSets               = new VirtualMachineScaleSetsOperations(this);
     VirtualMachineScaleSetExtensions      = new VirtualMachineScaleSetExtensionsOperations(this);
     VirtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesOperations(this);
     VirtualMachineScaleSetVMs             = new VirtualMachineScaleSetVMsOperations(this);
     LogAnalytics                          = new LogAnalyticsOperations(this);
     VirtualMachineRunCommands             = new VirtualMachineRunCommandsOperations(this);
     ResourceSkus                          = new ResourceSkusOperations(this);
     Disks                                 = new DisksOperations(this);
     Snapshots                             = new SnapshotsOperations(this);
     Galleries                             = new GalleriesOperations(this);
     GalleryImages                         = new GalleryImagesOperations(this);
     GalleryImageVersions                  = new GalleryImageVersionsOperations(this);
     ContainerServices                     = new ContainerServicesOperations(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());
 }
 public static ContainerServiceModel CreateOrUpdate(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, ContainerServiceModel parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters).GetAwaiter().GetResult());
 }
 public static IPage <ContainerServiceModel> ListByResourceGroupNext(this IContainerServicesOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 public static async Task BeginDeleteAsync(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, containerServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 public static void BeginDelete(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName)
 {
     operations.BeginDeleteAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult();
 }
 public static IPage <ContainerServiceModel> List(this IContainerServicesOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a list of supported orchestrators in the specified subscription.
 /// </summary>
 /// <remarks>
 /// Gets a list of supported orchestrators in the specified subscription. The
 /// operation returns properties of each orchestrator including version and
 /// available upgrades.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The name of a supported Azure region.
 /// </param>
 /// <param name='resourceType'>
 /// resource type for which the list of orchestrators needs to be returned
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OrchestratorVersionProfileListResult> ListOrchestratorsAsync(this IContainerServicesOperations operations, string location, string resourceType = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListOrchestratorsWithHttpMessagesAsync(location, resourceType, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of supported orchestrators in the specified subscription.
 /// </summary>
 /// <remarks>
 /// Gets a list of supported orchestrators in the specified subscription. The
 /// operation returns properties of each orchestrator including version and
 /// available upgrades.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The name of a supported Azure region.
 /// </param>
 /// <param name='resourceType'>
 /// resource type for which the list of orchestrators needs to be returned
 /// </param>
 public static OrchestratorVersionProfileListResult ListOrchestrators(this IContainerServicesOperations operations, string location, string resourceType = default(string))
 {
     return(operations.ListOrchestratorsAsync(location, resourceType).GetAwaiter().GetResult());
 }
 public static IPage <ContainerServiceModel> ListByResourceGroup(this IContainerServicesOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 public static ContainerServiceModel Get(this IContainerServicesOperations operations, string resourceGroupName, string containerServiceName)
 {
     return(operations.GetAsync(resourceGroupName, containerServiceName).GetAwaiter().GetResult());
 }
Esempio n. 14
0
 public static async Task <IPage <ContainerServiceInner> > ListByResourceGroupNextAsync(this IContainerServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }