コード例 #1
0
 /// <summary>
 /// Purges data in an Log Analytics workspace by a set of user-defined filters.
 ///
 /// In order to manage system resources, purge requests are throttled at 50
 /// requests per hour. You should batch the execution of purge requests by
 /// sending a single command whose predicate includes all user identities that
 /// require purging. Use the in operator to specify multiple identities. You
 /// should run the query prior to using for a purge request to verify that the
 /// results are expected.
 /// </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>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='body'>
 /// Describes the body of a request to purge data in a single table of an Log
 /// Analytics Workspace
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkspacePurgeResponse> PurgeAsync(this IWorkspacePurgeOperations operations, string resourceGroupName, string workspaceName, WorkspacePurgeBody body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PurgeWithHttpMessagesAsync(resourceGroupName, workspaceName, body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     DataExports           = new DataExportsOperations(this);
     DataSources           = new DataSourcesOperations(this);
     IntelligencePacks     = new IntelligencePacksOperations(this);
     LinkedServices        = new LinkedServicesOperations(this);
     LinkedStorageAccounts = new LinkedStorageAccountsOperations(this);
     ManagementGroups      = new ManagementGroupsOperations(this);
     Operations            = new Operations(this);
     OperationStatuses     = new OperationStatusesOperations(this);
     SharedKeys            = new SharedKeysOperations(this);
     Usages                           = new UsagesOperations(this);
     Workspaces                       = new WorkspacesOperations(this);
     DeletedWorkspaces                = new DeletedWorkspacesOperations(this);
     Clusters                         = new ClustersOperations(this);
     StorageInsightConfigs            = new StorageInsightConfigsOperations(this);
     SavedSearches                    = new SavedSearchesOperations(this);
     AvailableServiceTiers            = new AvailableServiceTiersOperations(this);
     Gateways                         = new GatewaysOperations(this);
     Schema                           = new SchemaOperations(this);
     WorkspacePurge                   = new WorkspacePurgeOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     ApiVersion                       = "2020-03-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());
 }
コード例 #3
0
 /// <summary>
 /// Purges data in an Log Analytics workspace by a set of user-defined filters.
 ///
 /// In order to manage system resources, purge requests are throttled at 50
 /// requests per hour. You should batch the execution of purge requests by
 /// sending a single command whose predicate includes all user identities that
 /// require purging. Use the in operator to specify multiple identities. You
 /// should run the query prior to using for a purge request to verify that the
 /// results are expected.
 /// </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>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='body'>
 /// Describes the body of a request to purge data in a single table of an Log
 /// Analytics Workspace
 /// </param>
 public static WorkspacePurgeResponse Purge(this IWorkspacePurgeOperations operations, string resourceGroupName, string workspaceName, WorkspacePurgeBody body)
 {
     return(operations.PurgeAsync(resourceGroupName, workspaceName, body).GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <summary>
 /// Gets status of an ongoing purge operation.
 /// </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>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='purgeId'>
 /// In a purge status request, this is the Id of the operation the status of
 /// which is returned.
 /// </param>
 public static WorkspacePurgeStatusResponse GetPurgeStatus(this IWorkspacePurgeOperations operations, string resourceGroupName, string workspaceName, string purgeId)
 {
     return(operations.GetPurgeStatusAsync(resourceGroupName, workspaceName, purgeId).GetAwaiter().GetResult());
 }