Ejemplo n.º 1
0
        protected override void ProcessRecord()
        {
            PSSavedSearchParameters parameters = new PSSavedSearchParameters(
                resourceGroupName: ResourceGroupName,
                workspaceName: WorkspaceName,
                savedSearchId: SavedSearchId,
                category: Category,
                displayName: DisplayName,
                query: Query,
                version: Version,
                functionAlias: FunctionAlias,
                functionParameter: FunctionParameter,
                eTag: string.IsNullOrEmpty(ETag) ? PSSavedSearchParameters.EtagWildCard : ETag,
                tags: Tag);

            if (ShouldProcess(DisplayName, $"Update new saved search: {DisplayName}, in workspace: {WorkspaceName}, resource group: {ResourceGroupName}"))
            {
                WriteObject(OperationalInsightsClient.UpdateSavedSearch(parameters));
            }
        }