Table of Contents

Class UserResponse

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

The cosmos user response

public class UserResponse : Response<UserProperties>
Inheritance
UserResponse
Inherited Members
Extension Methods

Constructors

UserResponse()

Create a UserResponse as a no-op for mock testing

protected UserResponse()

Properties

ActivityId

Gets the activity ID for the request from the Azure Cosmos DB service.

public override string ActivityId { get; }

Property Value

string

The activity ID for the request.

Diagnostics

Gets the cosmos diagnostics information for the current request to Azure Cosmos DB service

public override CosmosDiagnostics Diagnostics { get; }

Property Value

CosmosDiagnostics

ETag

Gets the entity tag associated with the resource from the Azure Cosmos DB service.

public override string ETag { get; }

Property Value

string

The entity tag associated with the resource.

Remarks

ETags are used for concurrency checking when updating resources.

Headers

Gets the current ResponseMessage HTTP headers.

public override Headers Headers { get; }

Property Value

Headers

RequestCharge

Gets the request charge for this request from the Azure Cosmos DB service.

public override double RequestCharge { get; }

Property Value

double

The request charge measured in request units.

Resource

The content of the response.

public override UserProperties Resource { get; }

Property Value

UserProperties

StatusCode

Gets the request completion status code from the Azure Cosmos DB service. This can be used to in scenario like CreateDatabaseIfNotExists to help determine if the database was created or already existed.

public override HttpStatusCode StatusCode { get; }

Property Value

HttpStatusCode

The request completion status code

Remarks

This is only used for success scenarios. The operation will throw a CosmosException on failures. For more info: https://aka.ms/cosmosdb-dot-net-exceptions

User

The reference to the cosmos user. This allows additional operations on the user or for easy access permissions

public virtual User User { get; }

Property Value

User

Operators

implicit operator User(UserResponse)

Get User implicitly from UserResponse

public static implicit operator User(UserResponse response)

Parameters

response UserResponse

UserResponse

Returns

User