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
StorageUriA StorageUri object containing the Blob service endpoint to use to create the client.
tableStorageUri
StorageUriA StorageUri object containing the Table service endpoint to use to create the client.
credentials
StorageCredentialsA 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
StorageServiceA StorageService enumeration value.
location
StorageLocationA 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
StorageServiceA StorageService enumeration value.
location
StorageLocationA 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
StorageServiceA 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
StorageServiceA StorageService enumeration value.
location
StorageLocationA 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
StorageServiceA 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
StorageServiceA 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
StorageServiceA StorageService enumeration value.
location
StorageLocationA 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
StorageServiceA 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
StorageServiceA StorageService enumeration value.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
StorageServiceA StorageService enumeration value.
startTime
DateTimeOffsetA 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
StorageServiceA StorageService enumeration value.
startTime
DateTimeOffsetA 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
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
StorageServiceA 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
StorageServiceA StorageService enumeration value.
operations
LoggingOperationsA LoggingOperations enumeration value that indicates the types of logging operations on which to filter the log blobs.
details
BlobListingDetailsA BlobListingDetails enumeration value that indicates whether or not blob metadata should be returned. Only
None
andMetadata
are valid values.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
StorageServiceA StorageService enumeration value.
startTime
DateTimeOffsetA 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
StorageServiceA StorageService enumeration value.
startTime
DateTimeOffsetA 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
LoggingOperationsA LoggingOperations enumeration value that indicates the types of logging operations on which to filter the log blobs.
details
BlobListingDetailsA BlobListingDetails enumeration value that indicates whether or not blob metadata should be returned. Only
None
andMetadata
are valid values.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
ICloudBlobThe 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
Returns
- IEnumerable<LogRecord>
An enumerable collection of objects that implement LogRecord and are retrieved lazily.