Table of Contents

Class CloudAnalyticsClient

Namespace
Microsoft.WindowsAzure.Storage.Analytics
Assembly
Microsoft.WindowsAzure.Storage.dll

Provides a client-side logical representation for Microsoft Azure Storage Analytics. This client is used to configure and execute requests against storage analytics.

public sealed class CloudAnalyticsClient
Inheritance
CloudAnalyticsClient
Inherited Members

Remarks

The analytics service client encapsulates the endpoints for the Blob and Table services. It also encapsulates credentials for accessing the storage account.

Constructors

CloudAnalyticsClient(StorageUri, StorageUri, StorageCredentials)

Initializes a new instance of the CloudAnalyticsClient class using the specified Blob and Table service endpoints and account credentials.

public CloudAnalyticsClient(StorageUri blobStorageUri, StorageUri tableStorageUri, StorageCredentials credentials)

Parameters

blobStorageUri StorageUri

A StorageUri object containing the Blob service endpoint to use to create the client.

tableStorageUri StorageUri

A StorageUri object containing the Table service endpoint to use to create the client.

credentials StorageCredentials

A StorageCredentials object.

Methods

CreateCapacityQuery()

Creates a TableQuery object for querying the Blob service capacity table.

public TableQuery<CapacityEntity> CreateCapacityQuery()

Returns

TableQuery<CapacityEntity>

A TableQuery object.

Remarks

This method is applicable only to Blob service.

CreateHourMetricsQuery(StorageService, StorageLocation)

Creates a TableQuery object for querying an hourly metrics log table.

public TableQuery<MetricsEntity> CreateHourMetricsQuery(StorageService service, StorageLocation location)

Parameters

service StorageService

A StorageService enumeration value.

location StorageLocation

A StorageLocation enumeration value.

Returns

TableQuery<MetricsEntity>

A TableQuery object.

CreateMinuteMetricsQuery(StorageService, StorageLocation)

Creates a TableQuery object for querying a minute metrics log table.

public TableQuery<MetricsEntity> CreateMinuteMetricsQuery(StorageService service, StorageLocation location)

Parameters

service StorageService

A StorageService enumeration value.

location StorageLocation

A StorageLocation enumeration value.

Returns

TableQuery<MetricsEntity>

A TableQuery object.

GetCapacityTable()

Gets the capacity metrics table for the Blob service.

public CloudTable GetCapacityTable()

Returns

CloudTable

A CloudTable object.

GetHourMetricsTable(StorageService)

Gets the hourly metrics table for the specified storage service.

public CloudTable GetHourMetricsTable(StorageService service)

Parameters

service StorageService

A StorageService enumeration value.

Returns

CloudTable

A CloudTable object.

GetHourMetricsTable(StorageService, StorageLocation)

Gets the hourly metrics table for the specified storage service.

public CloudTable GetHourMetricsTable(StorageService service, StorageLocation location)

Parameters

service StorageService

A StorageService enumeration value.

location StorageLocation

A StorageLocation enumeration value.

Returns

CloudTable

A CloudTable object.

GetLogDirectory(StorageService)

Gets a CloudBlobDirectory object containing the logs for the specified storage service.

public CloudBlobDirectory GetLogDirectory(StorageService service)

Parameters

service StorageService

A StorageService enumeration value.

Returns

CloudBlobDirectory

A CloudBlobDirectory object.

GetMinuteMetricsTable(StorageService)

Gets the minute metrics table for the specified storage service.

public CloudTable GetMinuteMetricsTable(StorageService service)

Parameters

service StorageService

A StorageService enumeration value.

Returns

CloudTable

A CloudTable object.

GetMinuteMetricsTable(StorageService, StorageLocation)

Gets the minute metrics table for the specified storage service.

public CloudTable GetMinuteMetricsTable(StorageService service, StorageLocation location)

Parameters

service StorageService

A StorageService enumeration value.

location StorageLocation

A StorageLocation enumeration value.

Returns

CloudTable

A CloudTable object.

ListLogRecords(StorageService)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public IEnumerable<LogRecord> ListLogRecords(StorageService service)

Parameters

service StorageService

A StorageService enumeration value.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.

ListLogRecords(StorageService, BlobRequestOptions, OperationContext)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public IEnumerable<LogRecord> ListLogRecords(StorageService service, BlobRequestOptions options, OperationContext operationContext)

Parameters

service StorageService

A StorageService enumeration value.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.

ListLogRecords(StorageService, DateTimeOffset, DateTimeOffset?)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public IEnumerable<LogRecord> ListLogRecords(StorageService service, DateTimeOffset startTime, DateTimeOffset? endTime)

Parameters

service StorageService

A StorageService enumeration value.

startTime DateTimeOffset

A DateTimeOffset object representing the start of the time range for which logs should be retrieved.

endTime DateTimeOffset?

A DateTimeOffset object representing the end of the time range for which logs should be retrieved.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.

ListLogRecords(StorageService, DateTimeOffset, DateTimeOffset?, BlobRequestOptions, OperationContext)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public IEnumerable<LogRecord> ListLogRecords(StorageService service, DateTimeOffset startTime, DateTimeOffset? endTime, BlobRequestOptions options, OperationContext operationContext)

Parameters

service StorageService

A StorageService enumeration value.

startTime DateTimeOffset

A DateTimeOffset object representing the start of the time range for which logs should be retrieved.

endTime DateTimeOffset?

A DateTimeOffset object representing the end of the time range for which logs should be retrieved.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.

ListLogs(StorageService)

Returns an enumerable collection of log blobs containing Analytics log records. The blobs are retrieved lazily.

public IEnumerable<ICloudBlob> ListLogs(StorageService service)

Parameters

service StorageService

A StorageService enumeration value.

Returns

IEnumerable<ICloudBlob>

An enumerable collection of objects that implement ICloudBlob and are retrieved lazily.

ListLogs(StorageService, LoggingOperations, BlobListingDetails, BlobRequestOptions, OperationContext)

Returns an enumerable collection of log blobs containing Analytics log records. The blobs are retrieved lazily.

public IEnumerable<ICloudBlob> ListLogs(StorageService service, LoggingOperations operations, BlobListingDetails details, BlobRequestOptions options, OperationContext operationContext)

Parameters

service StorageService

A StorageService enumeration value.

operations LoggingOperations

A LoggingOperations enumeration value that indicates the types of logging operations on which to filter the log blobs.

details BlobListingDetails

A BlobListingDetails enumeration value that indicates whether or not blob metadata should be returned. Only None and Metadata are valid values.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

IEnumerable<ICloudBlob>

An enumerable collection of objects that implement ICloudBlob and are retrieved lazily.

Remarks

Note that specifying a logging operation type for the operations parameter will return any Analytics log blob that contains the specified logging operation, even if that log blob also includes other types of logging operations. Also note that the only currently supported values for the details parameter are None and Metadata.

ListLogs(StorageService, DateTimeOffset, DateTimeOffset?)

Returns an enumerable collection of log blobs containing Analytics log records. The blobs are retrieved lazily.

public IEnumerable<ICloudBlob> ListLogs(StorageService service, DateTimeOffset startTime, DateTimeOffset? endTime)

Parameters

service StorageService

A StorageService enumeration value.

startTime DateTimeOffset

A DateTimeOffset object representing the start time for which logs should be retrieved.

endTime DateTimeOffset?

A DateTimeOffset object representing the end time for which logs should be retrieved.

Returns

IEnumerable<ICloudBlob>

An enumerable collection of objects that implement ICloudBlob and are retrieved lazily.

ListLogs(StorageService, DateTimeOffset, DateTimeOffset?, LoggingOperations, BlobListingDetails, BlobRequestOptions, OperationContext)

Returns an enumerable collection of log blobs containing Analytics log records. The blobs are retrieved lazily.

public IEnumerable<ICloudBlob> ListLogs(StorageService service, DateTimeOffset startTime, DateTimeOffset? endTime, LoggingOperations operations, BlobListingDetails details, BlobRequestOptions options, OperationContext operationContext)

Parameters

service StorageService

A StorageService enumeration value.

startTime DateTimeOffset

A DateTimeOffset object representing the start of the time range for which logs should be retrieved.

endTime DateTimeOffset?

A DateTimeOffset object representing the end of the time range for which logs should be retrieved.

operations LoggingOperations

A LoggingOperations enumeration value that indicates the types of logging operations on which to filter the log blobs.

details BlobListingDetails

A BlobListingDetails enumeration value that indicates whether or not blob metadata should be returned. Only None and Metadata are valid values.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

IEnumerable<ICloudBlob>

An enumerable collection of objects that implement ICloudBlob and are retrieved lazily.

Remarks

Note that specifying a logging operation type for the operations parameter will return any Analytics log blob that contains the specified logging operation, even if that log blob also includes other types of logging operations. Also note that the only currently supported values for the details parameter are None and Metadata.

ParseLogBlob(ICloudBlob)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public static IEnumerable<LogRecord> ParseLogBlob(ICloudBlob logBlob)

Parameters

logBlob ICloudBlob

The ICloudBlob object from which to parse log records.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.

ParseLogBlobs(IEnumerable<ICloudBlob>)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public static IEnumerable<LogRecord> ParseLogBlobs(IEnumerable<ICloudBlob> logBlobs)

Parameters

logBlobs IEnumerable<ICloudBlob>

An enumerable collection of ICloudBlob objects from which to parse log records.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.

ParseLogStream(Stream)

Returns an enumerable collection of Analytics log records, retrieved lazily.

public static IEnumerable<LogRecord> ParseLogStream(Stream stream)

Parameters

stream Stream

The Stream object from which to parse log records.

Returns

IEnumerable<LogRecord>

An enumerable collection of objects that implement LogRecord and are retrieved lazily.