Ejemplo n.º 1
0
 /// <summary>
 /// Get the list of update locations
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name.
 /// </param>
 /// <param name='updateLocation'>
 /// The name of the update location.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Update> > ListAsync(this IUpdatesOperations operations, string resourceGroupName, string updateLocation, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, updateLocation, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get the list of update locations
 /// </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 <Update> > ListNextAsync(this IUpdatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Get Updates to resource
 /// </summary>
 /// <remarks>
 /// Get updates to resources.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name
 /// </param>
 /// <param name='providerName'>
 /// Resource provider name
 /// </param>
 /// <param name='resourceParentType'>
 /// Resource parent type
 /// </param>
 /// <param name='resourceParentName'>
 /// Resource parent identifier
 /// </param>
 /// <param name='resourceType'>
 /// Resource type
 /// </param>
 /// <param name='resourceName'>
 /// Resource identifier
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Update> > ListParentAsync(this IUpdatesOperations operations, string resourceGroupName, string providerName, string resourceParentType, string resourceParentName, string resourceType, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListParentWithHttpMessagesAsync(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     PublicMaintenanceConfigurations = new PublicMaintenanceConfigurationsOperations(this);
     ApplyUpdates              = new ApplyUpdatesOperations(this);
     ConfigurationAssignments  = new ConfigurationAssignmentsOperations(this);
     MaintenanceConfigurations = new MaintenanceConfigurationsOperations(this);
     MaintenanceConfigurationsForResourceGroup = new MaintenanceConfigurationsForResourceGroupOperations(this);
     ApplyUpdateForResourceGroup = new ApplyUpdateForResourceGroupOperations(this);
     ConfigurationAssignmentsWithinSubscription = new ConfigurationAssignmentsWithinSubscriptionOperations(this);
     Operations     = new Operations(this);
     Updates        = new UpdatesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2021-09-01-preview";
     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());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Get a specific update at an update location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name.
 /// </param>
 /// <param name='updateLocation'>
 /// The name of the update location.
 /// </param>
 /// <param name='updateName'>
 /// Name of the update.
 /// </param>
 public static Update Get(this IUpdatesOperations operations, string resourceGroupName, string updateLocation, string updateName)
 {
     return(operations.GetAsync(resourceGroupName, updateLocation, updateName).GetAwaiter().GetResult());
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Get the list of update locations
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name.
 /// </param>
 /// <param name='updateLocation'>
 /// The name of the update location.
 /// </param>
 public static IPage <Update> List(this IUpdatesOperations operations, string resourceGroupName, string updateLocation)
 {
     return(operations.ListAsync(resourceGroupName, updateLocation).GetAwaiter().GetResult());
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Get the list of update locations
 /// </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 <Update> ListNext(this IUpdatesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Get Updates to resource
 /// </summary>
 /// <remarks>
 /// Get updates to resources.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource group name
 /// </param>
 /// <param name='providerName'>
 /// Resource provider name
 /// </param>
 /// <param name='resourceParentType'>
 /// Resource parent type
 /// </param>
 /// <param name='resourceParentName'>
 /// Resource parent identifier
 /// </param>
 /// <param name='resourceType'>
 /// Resource type
 /// </param>
 /// <param name='resourceName'>
 /// Resource identifier
 /// </param>
 public static IEnumerable <Update> ListParent(this IUpdatesOperations operations, string resourceGroupName, string providerName, string resourceParentType, string resourceParentName, string resourceType, string resourceName)
 {
     return(operations.ListParentAsync(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName).GetAwaiter().GetResult());
 }