Exemple #1
0
 /// <summary>
 /// Create a resource management group private link.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group the template will be deployed to. The name
 /// is case insensitive.
 /// </param>
 /// <param name='rmplName'>
 /// The name of the resource management private link.
 /// </param>
 /// <param name='parameters'>
 /// The region to create the Resource Management private link.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResourceManagementPrivateLink> PutAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PutWithHttpMessagesAsync(resourceGroupName, rmplName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Get all the resource management private links in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResourceManagementPrivateLinkListResult> ListAsync(this IResourceManagementPrivateLinkOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     PrivateLinkAssociation        = new PrivateLinkAssociationOperations(this);
     ResourceManagementPrivateLink = new ResourceManagementPrivateLinkOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2020-05-01";
     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()
         }
     };
     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 CloudErrorJsonConverter());
 }
Exemple #4
0
 /// <summary>
 /// Get a resource management private link(resource-level).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group the template will be deployed to. The name
 /// is case insensitive.
 /// </param>
 /// <param name='rmplName'>
 /// The name of the resource management private link.
 /// </param>
 public static ResourceManagementPrivateLink Get(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName)
 {
     return(operations.GetAsync(resourceGroupName, rmplName).GetAwaiter().GetResult());
 }
Exemple #5
0
 /// <summary>
 /// Create a resource management group private link.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group the template will be deployed to. The name
 /// is case insensitive.
 /// </param>
 /// <param name='rmplName'>
 /// The name of the resource management private link.
 /// </param>
 /// <param name='parameters'>
 /// The region to create the Resource Management private link.
 /// </param>
 public static ResourceManagementPrivateLink Put(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, ResourceManagementPrivateLinkLocation parameters)
 {
     return(operations.PutAsync(resourceGroupName, rmplName, parameters).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Get all the resource management private links in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static ResourceManagementPrivateLinkListResult List(this IResourceManagementPrivateLinkOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
Exemple #7
0
 /// <summary>
 /// Delete a resource management private link.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group the template will be deployed to. The name
 /// is case insensitive.
 /// </param>
 /// <param name='rmplName'>
 /// The name of the resource management private link.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, rmplName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #8
0
 /// <summary>
 /// Delete a resource management private link.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group the template will be deployed to. The name
 /// is case insensitive.
 /// </param>
 /// <param name='rmplName'>
 /// The name of the resource management private link.
 /// </param>
 public static void Delete(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName, string rmplName)
 {
     operations.DeleteAsync(resourceGroupName, rmplName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get all the resource management private links in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 public static ResourceManagementPrivateLinkListResult ListByResourceGroup(this IResourceManagementPrivateLinkOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }