Esempio n. 1
0
 /// <summary>
 /// Creates or updates a shared private link resource managed by the Search
 /// service in the given resource group.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Cognitive Search service associated with the
 /// specified resource group.
 /// </param>
 /// <param name='sharedPrivateLinkResourceName'>
 /// The name of the shared private link resource managed by the Azure Cognitive
 /// Search service within the specified resource group.
 /// </param>
 /// <param name='sharedPrivateLinkResource'>
 /// The definition of the shared private link resource to create or update.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SharedPrivateLinkResource> CreateOrUpdateAsync(this ISharedPrivateLinkResourcesOperations operations, string resourceGroupName, string searchServiceName, string sharedPrivateLinkResourceName, SharedPrivateLinkResource sharedPrivateLinkResource, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, searchServiceName, sharedPrivateLinkResourceName, sharedPrivateLinkResource, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations                 = new Operations(this);
     AdminKeys                  = new AdminKeysOperations(this);
     QueryKeys                  = new QueryKeysOperations(this);
     Services                   = new ServicesOperations(this);
     PrivateLinkResources       = new PrivateLinkResourcesOperations(this);
     PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
     SharedPrivateLinkResources = new SharedPrivateLinkResourcesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2020-03-13";
     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());
 }
Esempio n. 3
0
 /// <summary>
 /// Creates or updates a shared private link resource managed by the Search
 /// service in the given resource group.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Cognitive Search service associated with the
 /// specified resource group.
 /// </param>
 /// <param name='sharedPrivateLinkResourceName'>
 /// The name of the shared private link resource managed by the Azure Cognitive
 /// Search service within the specified resource group.
 /// </param>
 /// <param name='sharedPrivateLinkResource'>
 /// The definition of the shared private link resource to create or update.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static SharedPrivateLinkResource CreateOrUpdate(this ISharedPrivateLinkResourcesOperations operations, string resourceGroupName, string searchServiceName, string sharedPrivateLinkResourceName, SharedPrivateLinkResource sharedPrivateLinkResource, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, searchServiceName, sharedPrivateLinkResourceName, sharedPrivateLinkResource, searchManagementRequestOptions).GetAwaiter().GetResult());
 }
Esempio n. 4
0
 /// <summary>
 /// Gets a list of all shared private link resources managed by the given
 /// service.
 /// <see href="https://aka.ms/search-manage" />
 /// </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='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SharedPrivateLinkResource> > ListByServiceNextAsync(this ISharedPrivateLinkResourcesOperations operations, string nextPageLink, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Gets a list of all shared private link resources managed by the given
 /// service.
 /// <see href="https://aka.ms/search-manage" />
 /// </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='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <SharedPrivateLinkResource> ListByServiceNext(this ISharedPrivateLinkResourcesOperations operations, string nextPageLink, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
 {
     return(operations.ListByServiceNextAsync(nextPageLink, searchManagementRequestOptions).GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// Gets a list of all shared private link resources managed by the given
 /// service.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Cognitive Search service associated with the
 /// specified resource group.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <SharedPrivateLinkResource> ListByService(this ISharedPrivateLinkResourcesOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
 {
     return(operations.ListByServiceAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).GetAwaiter().GetResult());
 }
Esempio n. 7
0
 /// <summary>
 /// Deletes the shared private link resource from the Search service.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Cognitive Search service associated with the
 /// specified resource group.
 /// </param>
 /// <param name='sharedPrivateLinkResourceName'>
 /// The name of the shared private link resource managed by the Azure Cognitive
 /// Search service within the specified resource group.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ISharedPrivateLinkResourcesOperations operations, string resourceGroupName, string searchServiceName, string sharedPrivateLinkResourceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, searchServiceName, sharedPrivateLinkResourceName, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 8
0
 /// <summary>
 /// Deletes the shared private link resource from the Search service.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Cognitive Search service associated with the
 /// specified resource group.
 /// </param>
 /// <param name='sharedPrivateLinkResourceName'>
 /// The name of the shared private link resource managed by the Azure Cognitive
 /// Search service within the specified resource group.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static void Delete(this ISharedPrivateLinkResourcesOperations operations, string resourceGroupName, string searchServiceName, string sharedPrivateLinkResourceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
 {
     operations.DeleteAsync(resourceGroupName, searchServiceName, sharedPrivateLinkResourceName, searchManagementRequestOptions).GetAwaiter().GetResult();
 }