Package com.azure.cosmos.models
Class CosmosResponse<T>
java.lang.Object
com.azure.cosmos.models.CosmosResponse<T>
- Type Parameters:
T
- the type of resource
- Direct Known Subclasses:
CosmosClientEncryptionKeyResponse
,CosmosConflictResponse
,CosmosContainerResponse
,CosmosDatabaseResponse
,CosmosPermissionResponse
,CosmosStoredProcedureResponse
,CosmosTriggerResponse
,CosmosUserDefinedFunctionResponse
,CosmosUserResponse
,ThroughputResponse
The cosmos response
-
Method Summary
Modifier and TypeMethodDescriptionGets the Activity ID for the request.Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources)Gets the diagnostics information for the current request to Azure Cosmos DB service.Gets the end-to-end request latency for the current request to Azure Cosmos DB service.Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master resources).Gets properties.double
Gets the request charge as request units (RU) consumed by the operation.Gets the headers associated with the response.Gets the token used for managing client's consistency requirements.int
Gets the HTTP status code associated with the response.
-
Method Details
-
getProperties
Gets properties.- Returns:
- the properties
-
getMaxResourceQuota
Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master resources).For CosmosContainer, users will need to set
CosmosContainerRequestOptions.setQuotaInfoEnabled(boolean)
to true to get the quota information.- Returns:
- the max resource quota.
-
getCurrentResourceQuotaUsage
Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources)- Returns:
- the current resource quota usage.
-
getActivityId
Gets the Activity ID for the request.- Returns:
- the activity getId.
-
getRequestCharge
public double getRequestCharge()Gets the request charge as request units (RU) consumed by the operation.For more information about the RU and factors that can impact the effective charges please visit Request Units in Azure Cosmos DB
- Returns:
- the request charge.
-
getStatusCode
public int getStatusCode()Gets the HTTP status code associated with the response.- Returns:
- the status code.
-
getSessionToken
Gets the token used for managing client's consistency requirements.- Returns:
- the session token.
-
getResponseHeaders
Gets the headers associated with the response.- Returns:
- the response headers.
-
getDiagnostics
Gets the diagnostics information for the current request to Azure Cosmos DB service.- Returns:
- diagnostics information for the current request to Azure Cosmos DB service.
-
getDuration
Gets the end-to-end request latency for the current request to Azure Cosmos DB service.- Returns:
- end-to-end request latency for the current request to Azure Cosmos DB service.
-