Resource Resource Resource Class

Definition

Represents an abstract resource type in the Azure Cosmos DB service. All Azure Cosmos DB resources, such as Database, DocumentCollection, and Document extend this abstract type.

public abstract class Resource : Microsoft.Azure.Documents.JsonSerializable
type Resource = class
    inherit JsonSerializable
Public MustInherit Class Resource
Inherits JsonSerializable
Inheritance
Derived

Constructors

Resource() Resource() Resource()

Initializes a new instance of the Resource class for the Azure Cosmos DB service.

Resource(Resource) Resource(Resource) Resource(Resource)

Copy constructor for a Resource used in the Azure Cosmos DB service.

Properties

AltLink AltLink AltLink

Gets the alt-link associated with the resource from the Azure Cosmos DB service.

ETag ETag ETag

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

Id Id Id

Gets or sets the Id of the resource in the Azure Cosmos DB service.

ResourceId ResourceId ResourceId

Gets or sets the Resource Id associated with the resource in the Azure Cosmos DB service.

SelfLink SelfLink SelfLink

Gets the self-link associated with the resource from the Azure Cosmos DB service.

Timestamp Timestamp Timestamp

Gets the last modified timestamp associated with the resource from the Azure Cosmos DB service.

Methods

GetPropertyValue<T>(String) GetPropertyValue<T>(String) GetPropertyValue<T>(String)

Gets property value associated with the specified property name from the Azure Cosmos DB service.

LoadFrom(JsonReader) LoadFrom(JsonReader) LoadFrom(JsonReader)

Loads the object from the specified JSON reader in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
LoadFrom(JsonReader, JsonSerializerSettings) LoadFrom(JsonReader, JsonSerializerSettings) LoadFrom(JsonReader, JsonSerializerSettings)

Loads the object from the specified JSON reader in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
SaveTo(Stream, SerializationFormattingPolicy) SaveTo(Stream, SerializationFormattingPolicy) SaveTo(Stream, SerializationFormattingPolicy)

Saves the object to the specified stream in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
SaveTo(Stream, SerializationFormattingPolicy, JsonSerializerSettings) SaveTo(Stream, SerializationFormattingPolicy, JsonSerializerSettings) SaveTo(Stream, SerializationFormattingPolicy, JsonSerializerSettings)

Saves the object to the specified stream in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
SetPropertyValue(String, Object) SetPropertyValue(String, Object) SetPropertyValue(String, Object)

Sets property value associated with the specified property name in the Azure Cosmos DB service.

ToByteArray() ToByteArray() ToByteArray()

Serialize to a byte array via SaveTo for the Azure Cosmos DB service.

ToString() ToString() ToString()

Returns the string representation of the object in the Azure Cosmos DB service.

(Inherited from JsonSerializable)

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to