/// <summary> /// Updates a workbook that has already been added. /// </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='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='workbookProperties'> /// Properties that need to be specified to create a new workbook. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Workbook> UpdateAsync(this IWorkbooksOperations operations, string resourceGroupName, string resourceName, Workbook workbookProperties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, workbookProperties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all Workbooks defined within a specified resource group and category. /// </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='category'> /// Category of workbook to return. Possible values include: 'workbook', 'TSG', /// 'performance', 'retention' /// </param> /// <param name='tags'> /// Tags presents on each workbook returned. /// </param> /// <param name='canFetchContent'> /// Flag indicating whether or not to return the full content for each /// applicable workbook. If false, only return summary content for workbooks. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <Workbook> > ListByResourceGroupAsync(this IWorkbooksOperations operations, string resourceGroupName, string category, IList <string> tags = default(IList <string>), bool?canFetchContent = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, category, tags, canFetchContent, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Annotations = new AnnotationsOperations(this); APIKeys = new APIKeysOperations(this); ExportConfigurations = new ExportConfigurationsOperations(this); ComponentCurrentBillingFeatures = new ComponentCurrentBillingFeaturesOperations(this); ComponentQuotaStatus = new ComponentQuotaStatusOperations(this); ComponentFeatureCapabilities = new ComponentFeatureCapabilitiesOperations(this); ComponentAvailableFeatures = new ComponentAvailableFeaturesOperations(this); ProactiveDetectionConfigurations = new ProactiveDetectionConfigurationsOperations(this); Components = new ComponentsOperations(this); WorkItemConfigurations = new WorkItemConfigurationsOperations(this); Favorites = new FavoritesOperations(this); WebTestLocations = new WebTestLocationsOperations(this); WebTests = new WebTestsOperations(this); AnalyticsItems = new AnalyticsItemsOperations(this); Workbooks = new WorkbooksOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2015-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() } }; 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()); }
/// <summary> /// Get a single workbook by its resourceName. /// </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='resourceName'> /// The name of the Application Insights component resource. /// </param> public static Workbook Get(this IWorkbooksOperations operations, string resourceGroupName, string resourceName) { return(operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult()); }
/// <summary> /// Get all Workbooks defined within a specified resource group and category. /// </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='category'> /// Category of workbook to return. Possible values include: 'workbook', 'TSG', /// 'performance', 'retention' /// </param> /// <param name='tags'> /// Tags presents on each workbook returned. /// </param> /// <param name='canFetchContent'> /// Flag indicating whether or not to return the full content for each /// applicable workbook. If false, only return summary content for workbooks. /// </param> public static IEnumerable <Workbook> ListByResourceGroup(this IWorkbooksOperations operations, string resourceGroupName, string category, IList <string> tags = default(IList <string>), bool?canFetchContent = default(bool?)) { return(operations.ListByResourceGroupAsync(resourceGroupName, category, tags, canFetchContent).GetAwaiter().GetResult()); }
/// <summary> /// Updates a workbook that has already been added. /// </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='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='workbookProperties'> /// Properties that need to be specified to create a new workbook. /// </param> public static Workbook Update(this IWorkbooksOperations operations, string resourceGroupName, string resourceName, Workbook workbookProperties) { return(operations.UpdateAsync(resourceGroupName, resourceName, workbookProperties).GetAwaiter().GetResult()); }
/// <summary> /// Delete a workbook. /// </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='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IWorkbooksOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete a workbook. /// </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='resourceName'> /// The name of the Application Insights component resource. /// </param> public static void Delete(this IWorkbooksOperations operations, string resourceGroupName, string resourceName) { operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); }