/// <summary> /// List all table services for the storage account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ListTableServices> ListAsync(this ITableServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of metrics for table service. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Metric> > ListMetricsNextAsync(this ITableServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListMetricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Sets the properties of a storage account’s Table service, including /// properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) /// rules. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='cors'> /// Specifies CORS rules for the Table service. You can include up to five /// CorsRule elements in the request. If no CorsRule elements are included in /// the request body, all CORS rules will be deleted, and CORS will be disabled /// for the Table service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TableServiceProperties> SetServicePropertiesAsync(this ITableServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, cors, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of metrics for table service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name. /// </param> /// <param name='farmId'> /// Farm Id. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Metric> > ListMetricsAsync(this ITableServicesOperations operations, string resourceGroupName, string farmId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, farmId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Acquisitions = new AcquisitionsOperations(this); BlobServices = new BlobServicesOperations(this); Containers = new ContainersOperations(this); Farms = new FarmsOperations(this); QueueServices = new QueueServicesOperations(this); StorageQuotas = new StorageQuotasOperations(this); Shares = new SharesOperations(this); StorageAccounts = new StorageAccountsOperations(this); TableServices = new TableServicesOperations(this); BaseUri = new System.Uri("https://adminmanagement.local.azurestack.external"); ApiVersion = "2015-12-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()); }
/// <summary> /// Sets the properties of a storage account’s Table service, including /// properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) /// rules. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> /// <param name='cors'> /// Specifies CORS rules for the Table service. You can include up to five /// CorsRule elements in the request. If no CorsRule elements are included in /// the request body, all CORS rules will be deleted, and CORS will be disabled /// for the Table service. /// </param> public static TableServiceProperties SetServiceProperties(this ITableServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules)) { return(operations.SetServicePropertiesAsync(resourceGroupName, accountName, cors).GetAwaiter().GetResult()); }
/// <summary> /// List all table services for the storage account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> public static ListTableServices List(this ITableServicesOperations operations, string resourceGroupName, string accountName) { return(operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Gets the properties of a storage account’s Table service, including /// properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) /// rules. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='accountName'> /// The name of the storage account within the specified resource group. /// Storage account names must be between 3 and 24 characters in length and use /// numbers and lower-case letters only. /// </param> public static TableServiceProperties GetServiceProperties(this ITableServicesOperations operations, string resourceGroupName, string accountName) { return(operations.GetServicePropertiesAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of metric definitions for table service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name. /// </param> /// <param name='farmId'> /// Farm Id. /// </param> public static IPage <MetricDefinition> ListMetricDefinitions(this ITableServicesOperations operations, string resourceGroupName, string farmId) { return(operations.ListMetricDefinitionsAsync(resourceGroupName, farmId).GetAwaiter().GetResult()); }
/// <summary> /// Returns the table servie. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name. /// </param> /// <param name='farmId'> /// Farm Id. /// </param> public static TableService Get(this ITableServicesOperations operations, string resourceGroupName, string farmId) { return(operations.GetAsync(resourceGroupName, farmId).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of metrics for table service. /// </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> public static IPage <Metric> ListMetricsNext(this ITableServicesOperations operations, string nextPageLink) { return(operations.ListMetricsNextAsync(nextPageLink).GetAwaiter().GetResult()); }