C# 클래스 EsuApiLib.Rest.EsuRestApi

Implements the REST version of the ESU API. This class uses HttpWebRequest to perform object and metadata calls against the ESU server. All of the methods that communicate with the server are atomic and stateless so the object can be used safely in a multithreaded environment.
상속: EsuApi
파일 보기 프로젝트 열기: EMCECS/atmos-dotnet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
port int
protocol string

공개 메소드들

메소드 설명
CalculateServerOffset ( ) : int

Calculates the time offset between the server and the local system in seconds. You can set this value on the ServerOffset property to adjust outgoing timestamps to account for clock skew. Resolution is one second.

CreateAccessToken ( Identifier id, PolicyType policy, Acl acl ) : Uri

Creates an anonymous access token using the specified policy and ACL

CreateObject ( Acl acl, MetadataList metadata, byte data, string mimeType ) : ObjectId

Creates a new object in the cloud.

CreateObject ( Acl acl, MetadataList metadata, byte data, string mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud.

CreateObjectFromSegment ( Acl acl, MetadataList metadata, ArraySegment data, string mimeType ) : ObjectId

Creates a new object in the cloud using an ArraySegment.

CreateObjectFromSegment ( Acl acl, MetadataList metadata, ArraySegment data, string mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud using an ArraySegment.

CreateObjectFromSegmentOnPath ( ObjectPath path, Acl acl, MetadataList metadata, ArraySegment data, String mimeType ) : ObjectId

Creates a new object in the cloud using a BufferSegment on the given path.

CreateObjectFromSegmentOnPath ( ObjectPath path, Acl acl, MetadataList metadata, ArraySegment data, String mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud using a BufferSegment on the given path.

CreateObjectFromSegmentWithKey ( ObjectKey key, Acl acl, MetadataList metadata, ArraySegment data, String mimeType ) : ObjectId

Creates a new object in the cloud with the given key (and key-pool).

CreateObjectFromSegmentWithKey ( ObjectKey key, Acl acl, MetadataList metadata, ArraySegment data, String mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud with the given key (and key-pool).

CreateObjectFromStream ( Acl acl, MetadataList metadata, Stream data, long streamLength, string mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud reading the content a Stream.

CreateObjectFromStreamOnPath ( ObjectPath path, Acl acl, MetadataList metadata, Stream data, long streamLength, string mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud reading the content a Stream.

CreateObjectFromStreamWithKey ( ObjectKey key, Acl acl, MetadataList metadata, Stream data, long streamLength, string mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud with the given key (and key-pool).

CreateObjectOnPath ( ObjectPath path, Acl acl, MetadataList metadata, byte data, String mimeType ) : ObjectId

Creates a new object in the cloud on the given path.

CreateObjectOnPath ( ObjectPath path, Acl acl, MetadataList metadata, byte data, String mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud on the given path.

CreateObjectWithKey ( ObjectKey key, Acl acl, MetadataList metadata, byte data, String mimeType ) : ObjectId

Creates a new object in the cloud with the given key (and key-pool).

CreateObjectWithKey ( ObjectKey key, Acl acl, MetadataList metadata, byte data, String mimeType, Checksum checksum ) : ObjectId

Creates a new object in the cloud with the given key (and key-pool).

CreateSubtenant ( ) : string

Creates a new Atmos subtenant in ECS using the default Replication Group from the Namespace. Note: this API is only applicable to ECS and not to native Atmos. Also, note that when calling this API, the UID set on the EsuRestApi object should be a "bare" UID without a prefixing subtenant ID.

CreateSubtenant ( string replicationGroupId ) : string

Creates a new Atmos subtenant in ECS. Note: this API is only applicable to ECS and not to native Atmos. Also, note that when calling this API, the UID set on the EsuRestApi object should be a "bare" UID without a prefixing subtenant ID.

DeleteAccessToken ( Uri tokenUri ) : void

Deletes the specified access token. Implementation simply extracts the token ID from the URL and calls deleteAccessToken(String).

DeleteAccessToken ( string tokenId ) : void

Deletes the specified access token.

DeleteObject ( Identifier id ) : void

Deletes an object from the cloud.

DeleteSubtenant ( string subtenantId ) : void

Deletes an Atmos subtenant from ECS. Note: this API is only applicable to ECS and not to native Atmos. Also, note that when calling this API, the UID set on the EsuRestApi object should be a "bare" UID without a prefixing subtenant ID.

DeleteUserMetadata ( Identifier id, MetadataTags tags ) : void

Deletes metadata items from an object.

DeleteVersion ( ObjectId vId ) : void

Deletes a version from an object. You cannot specify the base version of an object.

EsuRestApi ( string host, int port, string uid, string sharedSecret ) : System

Creates a new EsuRestApi object

GetAccessToken ( Uri tokenUri ) : AccessTokenType

Retrieves details about the specified access token. Implementation simply extracts the token ID from the URL and calls GetAccessToken(String).

GetAccessToken ( string tokenId ) : AccessTokenType

Retrieves details about the specified access token.

GetAcl ( Identifier id ) : Acl

Returns an object's ACL

GetAllMetadata ( Identifier id ) : ObjectMetadata

Returns all of an object's metadata and its ACL in one call.

GetHost ( ) : string

Gets the name or IP of the host this object connects to.

GetListableTags ( MetadataTag tag ) : MetadataTags

Returns the set of listable tags for the current Tennant.

GetListableTags ( string tag ) : MetadataTags

Returns the set of listable tags for the current Tennant.

GetObjectInfo ( Identifier id ) : ObjectInfo

Gets Replica, Expiration, and Retention information for an object

GetPort ( ) : int

Gets the port number this object connects to.

GetServiceInformation ( ) : ServiceInformation

Gets information about the connected service. Currently, this is only the version of Atmos.

GetShareableUrl ( Identifier id, System.DateTime expiration ) : Uri

An Atmos user (UID) can construct a pre-authenticated URL to an object, which may then be used by anyone to retrieve the object (e.g., through a browser). This allows an Atmos user to let a non-Atmos user download a specific object. The entire object/file is read.

GetShareableUrl ( Identifier id, System.DateTime expiration, string disposition ) : Uri

Creates a shareable URL with the specified content-disposition. This disposition value will be returned in the Content-Disposition response header.

GetSystemMetadata ( Identifier id, MetadataTags tags ) : MetadataList

Fetches the system metadata for the object.

GetUid ( ) : string

Gets the UID used for this object's connections.

GetUserMetadata ( Identifier id, MetadataTags tags ) : MetadataList

Fetches the user metadata for the object.

ListAccessTokens ( ListOptions options ) : List

Lists all access tokens owned by the user using the options provided.

ListDirectory ( ObjectPath path ) : List

Lists the contents of a directory.

ListDirectory ( ObjectPath path, ListOptions options ) : List

Lists the contents of a directory.

ListObjects ( MetadataTag tag ) : List

Lists all objects with the given tag.

ListObjects ( string tag ) : List

Lists all objects with the given tag.

ListObjects ( MetadataTag tag, ListOptions options ) : List

Lists all objects with the given tag.

ListObjects ( string tag, ListOptions options ) : List

Lists all objects with the given tag.

ListObjectsWithMetadata ( MetadataTag tag ) : List

Lists all objects with the given tag. This method returns both the objects' IDs as well as their metadata.

ListObjectsWithMetadata ( string tag ) : List

Lists all objects with the given tag. This method returns both the objects' IDs as well as their metadata.

ListUserMetadataTags ( Identifier id ) : MetadataTags

Returns the list of user metadata tags assigned to the object.

ListVersions ( Identifier id ) : List

Lists the versions of an object.

QueryObjects ( string xquery ) : List

Executes a query for objects matching the specified XQuery string.

ReadObject ( Identifier id, Extent extent, byte buffer ) : byte[]

Reads an object's content.

ReadObject ( Identifier id, Extent extent, byte buffer, Checksum checksum ) : byte[]

Reads an object's content.

ReadObjectExtents ( Identifier id ) : MultipartEntity

Reads content from multiple extents within an object using a single call.

ReadObjectStream ( Identifier id, Extent extent ) : ReadObjectStreamResponse

Fetches object content as a stream

Rename ( ObjectPath source, ObjectPath destination, bool force ) : void

Renames a file or directory within the namespace.

RestoreVersion ( ObjectId id, ObjectId vId ) : void

Restores a version of an object to the base version (i.e. "promote" an old version to the current version).

Set100Continue ( bool enabled ) : void

By default, when posting data .Net will not post a body on the first request and tell the server it expects "100 Continue". After getting "100 Continue" it then posts the data. This is done to avoid sending the body when redirects or errors occur but can be detrimental to performance since more round trips are required.

SetAcl ( Identifier id, Acl acl ) : void

Sets the access control list on the object.

SetUserMetadata ( Identifier id, MetadataList metadata ) : void

Writes the metadata into the object. If the tag does not exist, it is created and set to the corresponding value. If the tag exists, the existing value is replaced.

UpdateObject ( Identifier id, Acl acl, MetadataList metadata, Extent extent, byte data, string mimeType ) : void

Updates an object in the cloud.

UpdateObject ( Identifier id, Acl acl, MetadataList metadata, Extent extent, byte data, string mimeType, Checksum checksum ) : void

Updates an object in the cloud.

UpdateObjectFromSegment ( Identifier id, Acl acl, MetadataList metadata, Extent extent, ArraySegment data, string mimeType ) : void

Updates an object in the cloud.

UpdateObjectFromSegment ( Identifier id, Acl acl, MetadataList metadata, Extent extent, ArraySegment data, string mimeType, Checksum checksum ) : void

Updates an object in the cloud.

UpdateObjectFromStream ( Identifier id, Acl acl, MetadataList metadata, Extent extent, Stream data, long streamLength, string mimeType, Checksum checksum ) : void

Updates an object in the cloud.

VersionObject ( Identifier id ) : ObjectId

Creates a new immutable version of an object.

getShareableUrl ( Identifier id, System.DateTime expiration ) : Uri

An Atmos user (UID) can construct a pre-authenticated URL to an object, which may then be used by anyone to retrieve the object (e.g., through a browser). This allows an Atmos user to let a non-Atmos user download a specific object. The entire object/file is read.

보호된 메소드들

메소드 설명
buildUrl ( string resource ) : Uri

비공개 메소드들

메소드 설명
addDateHeader ( string>.Dictionary headers ) : void
createWebRequest ( Uri u ) : HttpWebRequest
formatTag ( Metadata meta ) : string
getChildByName ( string name, XmlNodeList children ) : XmlNode
getIds ( List list ) : List
getResourcePath ( string ctx, Identifier id ) : string
handleError ( HttpWebResponse resp ) : void
join ( List list, string delim ) : string

Joins a list of values with a delimiter

normalizeHeaderValue ( string p ) : string
parseDirectoryList ( byte dir, ObjectPath path ) : List
parseObjectList ( string responseStr ) : List
parseObjectListWithMetadata ( string responseStr ) : List
parseServiceInformation ( string responseStr, NameValueCollection headers ) : ServiceInformation
parseVersionList ( string responseStr ) : List
processAcl ( Acl acl, string>.Dictionary headers ) : void
processMetadata ( MetadataList metadata, string>.Dictionary headers ) : void
processTags ( MetadataTags tags, string>.Dictionary headers ) : void
readAcl ( Acl acl, string header, EsuApiLib type ) : void
readMetadata ( MetadataList meta, string header, bool listable ) : void
readResponse ( HttpWebResponse resp, byte buffer, Extent extent ) : byte[]
readTags ( MetadataTags tags, string header, bool listable ) : void
sign ( byte hashBytes ) : string
signRequest ( HttpWebRequest con, string method, string resource, string>.Dictionary headers ) : void
utf8Decode ( string encodedValue ) : string
utf8Encode ( string rawValue ) : string
writeRequestBodyFromStream ( HttpWebRequest con, Stream data, long streamLength ) : void

메소드 상세

CalculateServerOffset() 공개 메소드

Calculates the time offset between the server and the local system in seconds. You can set this value on the ServerOffset property to adjust outgoing timestamps to account for clock skew. Resolution is one second.
public CalculateServerOffset ( ) : int
리턴 int

CreateAccessToken() 공개 메소드

Creates an anonymous access token using the specified policy and ACL
public CreateAccessToken ( Identifier id, PolicyType policy, Acl acl ) : Uri
id Identifier identifier of the target object for the access token.
policy PolicyType the token policy for the new access token.
acl Acl the ACL that will be assigned to objects created using this access token.
리턴 System.Uri

CreateObject() 공개 메소드

Creates a new object in the cloud.
public CreateObject ( Acl acl, MetadataList metadata, byte data, string mimeType ) : ObjectId
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data byte The initial contents of the object. May be appended to later. May be null to create an object with no content.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 ObjectId

CreateObject() 공개 메소드

Creates a new object in the cloud.
public CreateObject ( Acl acl, MetadataList metadata, byte data, string mimeType, Checksum checksum ) : ObjectId
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data byte The initial contents of the object. May be appended to later. May be null to create an object with no content.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectFromSegment() 공개 메소드

Creates a new object in the cloud using an ArraySegment.
public CreateObjectFromSegment ( Acl acl, MetadataList metadata, ArraySegment data, string mimeType ) : ObjectId
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data ArraySegment The initial contents of the object. May be appended to later. May be null to create an object with no content.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 ObjectId

CreateObjectFromSegment() 공개 메소드

Creates a new object in the cloud using an ArraySegment.
public CreateObjectFromSegment ( Acl acl, MetadataList metadata, ArraySegment data, string mimeType, Checksum checksum ) : ObjectId
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data ArraySegment The initial contents of the object. May be appended to later. May be null to create an object with no content.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectFromSegmentOnPath() 공개 메소드

Creates a new object in the cloud using a BufferSegment on the given path.
public CreateObjectFromSegmentOnPath ( ObjectPath path, Acl acl, MetadataList metadata, ArraySegment data, String mimeType ) : ObjectId
path ObjectPath the path to create the object on.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data ArraySegment The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 ObjectId

CreateObjectFromSegmentOnPath() 공개 메소드

Creates a new object in the cloud using a BufferSegment on the given path.
public CreateObjectFromSegmentOnPath ( ObjectPath path, Acl acl, MetadataList metadata, ArraySegment data, String mimeType, Checksum checksum ) : ObjectId
path ObjectPath the path to create the object on.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data ArraySegment The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectFromSegmentWithKey() 공개 메소드

Creates a new object in the cloud with the given key (and key-pool).
public CreateObjectFromSegmentWithKey ( ObjectKey key, Acl acl, MetadataList metadata, ArraySegment data, String mimeType ) : ObjectId
key ObjectKey the key-pool and key to use for the new object.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data ArraySegment The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 ObjectId

CreateObjectFromSegmentWithKey() 공개 메소드

Creates a new object in the cloud with the given key (and key-pool).
public CreateObjectFromSegmentWithKey ( ObjectKey key, Acl acl, MetadataList metadata, ArraySegment data, String mimeType, Checksum checksum ) : ObjectId
key ObjectKey the key-pool and key to use for the new object.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data ArraySegment The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectFromStream() 공개 메소드

Creates a new object in the cloud reading the content a Stream.
public CreateObjectFromStream ( Acl acl, MetadataList metadata, Stream data, long streamLength, string mimeType, Checksum checksum ) : ObjectId
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data Stream The initial contents of the object. Note that we will read only 'streamLength' bytes from the stream and do not close it
streamLength long The number of bytes to read from the stream. Must be <= the actual number of bytes in the stream.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectFromStreamOnPath() 공개 메소드

Creates a new object in the cloud reading the content a Stream.
public CreateObjectFromStreamOnPath ( ObjectPath path, Acl acl, MetadataList metadata, Stream data, long streamLength, string mimeType, Checksum checksum ) : ObjectId
path ObjectPath The path to create the new object on
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data Stream The initial contents of the object. Note that we only read 'streamLength' bytes from the stream and do not close the stream.
streamLength long The number of bytes to read from the stream. Must be <= the actual stream length.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectFromStreamWithKey() 공개 메소드

Creates a new object in the cloud with the given key (and key-pool).
public CreateObjectFromStreamWithKey ( ObjectKey key, Acl acl, MetadataList metadata, Stream data, long streamLength, string mimeType, Checksum checksum ) : ObjectId
key ObjectKey the key-pool and key to use for the new object.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data Stream The initial contents of the object. Note that we will read only 'streamLength' bytes from the stream and do not close it
streamLength long The number of bytes to read from the stream. Must be <= the actual number of bytes in the stream.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectOnPath() 공개 메소드

Creates a new object in the cloud on the given path.
public CreateObjectOnPath ( ObjectPath path, Acl acl, MetadataList metadata, byte data, String mimeType ) : ObjectId
path ObjectPath the path to create the object on.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data byte The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 ObjectId

CreateObjectOnPath() 공개 메소드

Creates a new object in the cloud on the given path.
public CreateObjectOnPath ( ObjectPath path, Acl acl, MetadataList metadata, byte data, String mimeType, Checksum checksum ) : ObjectId
path ObjectPath the path to create the object on.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data byte The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateObjectWithKey() 공개 메소드

Creates a new object in the cloud with the given key (and key-pool).
public CreateObjectWithKey ( ObjectKey key, Acl acl, MetadataList metadata, byte data, String mimeType ) : ObjectId
key ObjectKey the key-pool and key to use for the new object.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data byte The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 ObjectId

CreateObjectWithKey() 공개 메소드

Creates a new object in the cloud with the given key (and key-pool).
public CreateObjectWithKey ( ObjectKey key, Acl acl, MetadataList metadata, byte data, String mimeType, Checksum checksum ) : ObjectId
key ObjectKey the key-pool and key to use for the new object.
acl Acl Access control list for the new object. May be null to use a default ACL
metadata MetadataList Metadata for the new object. May be null for no metadata.
data byte The initial contents of the object. May be appended to later. May be null to create an object with no content or a directory.
mimeType String the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 ObjectId

CreateSubtenant() 공개 메소드

Creates a new Atmos subtenant in ECS using the default Replication Group from the Namespace. Note: this API is only applicable to ECS and not to native Atmos. Also, note that when calling this API, the UID set on the EsuRestApi object should be a "bare" UID without a prefixing subtenant ID.
public CreateSubtenant ( ) : string
리턴 string

CreateSubtenant() 공개 메소드

Creates a new Atmos subtenant in ECS. Note: this API is only applicable to ECS and not to native Atmos. Also, note that when calling this API, the UID set on the EsuRestApi object should be a "bare" UID without a prefixing subtenant ID.
public CreateSubtenant ( string replicationGroupId ) : string
replicationGroupId string Optional. The ECS Replication Group ID to use for the subtenant. If null, the default replication group from the Namespace will be used.
리턴 string

DeleteAccessToken() 공개 메소드

Deletes the specified access token. Implementation simply extracts the token ID from the URL and calls deleteAccessToken(String).
public DeleteAccessToken ( Uri tokenUri ) : void
tokenUri System.Uri The URL of the access token.
리턴 void

DeleteAccessToken() 공개 메소드

Deletes the specified access token.
public DeleteAccessToken ( string tokenId ) : void
tokenId string The ID of the access token.
리턴 void

DeleteObject() 공개 메소드

Deletes an object from the cloud.
public DeleteObject ( Identifier id ) : void
id Identifier The identifier of the object to delete.
리턴 void

DeleteSubtenant() 공개 메소드

Deletes an Atmos subtenant from ECS. Note: this API is only applicable to ECS and not to native Atmos. Also, note that when calling this API, the UID set on the EsuRestApi object should be a "bare" UID without a prefixing subtenant ID.
public DeleteSubtenant ( string subtenantId ) : void
subtenantId string The ID of the subtenant to delete
리턴 void

DeleteUserMetadata() 공개 메소드

Deletes metadata items from an object.
public DeleteUserMetadata ( Identifier id, MetadataTags tags ) : void
id Identifier The identifier of the object whose metadata to delete.
tags MetadataTags The list of metadata tags to delete.
리턴 void

DeleteVersion() 공개 메소드

Deletes a version from an object. You cannot specify the base version of an object.
public DeleteVersion ( ObjectId vId ) : void
vId ObjectId The ObjectID of the version to delete.
리턴 void

EsuRestApi() 공개 메소드

Creates a new EsuRestApi object
public EsuRestApi ( string host, int port, string uid, string sharedSecret ) : System
host string The hostname or IP address of the ESU server
port int The port on the server to communicate with. Generally this is 80 for HTTP and 443 for HTTPS.
uid string The username to use when connecting to the server
sharedSecret string The Base64 encoded shared secret to use to sign requests to the server.
리턴 System

GetAccessToken() 공개 메소드

Retrieves details about the specified access token. Implementation simply extracts the token ID from the URL and calls GetAccessToken(String).
public GetAccessToken ( Uri tokenUri ) : AccessTokenType
tokenUri System.Uri The URL of the access token.
리턴 AccessTokenType

GetAccessToken() 공개 메소드

Retrieves details about the specified access token.
public GetAccessToken ( string tokenId ) : AccessTokenType
tokenId string The ID of the access token.
리턴 AccessTokenType

GetAcl() 공개 메소드

Returns an object's ACL
public GetAcl ( Identifier id ) : Acl
id Identifier The identifier of the object whose ACL to read
리턴 Acl

GetAllMetadata() 공개 메소드

Returns all of an object's metadata and its ACL in one call.
public GetAllMetadata ( Identifier id ) : ObjectMetadata
id Identifier the object's identifier.
리턴 ObjectMetadata

GetHost() 공개 메소드

Gets the name or IP of the host this object connects to.
public GetHost ( ) : string
리턴 string

GetListableTags() 공개 메소드

Returns the set of listable tags for the current Tennant.
public GetListableTags ( MetadataTag tag ) : MetadataTags
tag MetadataTag The tag whose children to list. If null, only toplevel tags will be returned.
리턴 MetadataTags

GetListableTags() 공개 메소드

Returns the set of listable tags for the current Tennant.
public GetListableTags ( string tag ) : MetadataTags
tag string The tag whose children to list. If null, only toplevel tags will be returned.
리턴 MetadataTags

GetObjectInfo() 공개 메소드

Gets Replica, Expiration, and Retention information for an object
public GetObjectInfo ( Identifier id ) : ObjectInfo
id Identifier
리턴 ObjectInfo

GetPort() 공개 메소드

Gets the port number this object connects to.
public GetPort ( ) : int
리턴 int

GetServiceInformation() 공개 메소드

Gets information about the connected service. Currently, this is only the version of Atmos.
public GetServiceInformation ( ) : ServiceInformation
리턴 ServiceInformation

GetShareableUrl() 공개 메소드

An Atmos user (UID) can construct a pre-authenticated URL to an object, which may then be used by anyone to retrieve the object (e.g., through a browser). This allows an Atmos user to let a non-Atmos user download a specific object. The entire object/file is read.
public GetShareableUrl ( Identifier id, System.DateTime expiration ) : Uri
id Identifier the object to generate the URL for
expiration System.DateTime expiration the expiration date of the URL. Note, be sure to ensure your expiration is in UTC (DateTimeKind.Utc)
리턴 System.Uri

GetShareableUrl() 공개 메소드

Creates a shareable URL with the specified content-disposition. This disposition value will be returned in the Content-Disposition response header.
public GetShareableUrl ( Identifier id, System.DateTime expiration, string disposition ) : Uri
id Identifier the object to generate the URL for
expiration System.DateTime expiration the expiration date of the URL. Note, be sure to ensure your expiration is in UTC (DateTimeKind.Utc)
disposition string the value that will be sent by the server in the Content-Disposition response header
리턴 System.Uri

GetSystemMetadata() 공개 메소드

Fetches the system metadata for the object.
public GetSystemMetadata ( Identifier id, MetadataTags tags ) : MetadataList
id Identifier the identifier of the object whose system metadata to fetch.
tags MetadataTags A list of system metadata tags to fetch. Optional. If null, all metadata will be fetched.
리턴 MetadataList

GetUid() 공개 메소드

Gets the UID used for this object's connections.
public GetUid ( ) : string
리턴 string

GetUserMetadata() 공개 메소드

Fetches the user metadata for the object.
public GetUserMetadata ( Identifier id, MetadataTags tags ) : MetadataList
id Identifier the identifier of the object whose user metadata to fetch.
tags MetadataTags A list of user metadata tags to fetch. Optional. If null, all user metadata will be fetched.
리턴 MetadataList

ListAccessTokens() 공개 메소드

Lists all access tokens owned by the user using the options provided.
public ListAccessTokens ( ListOptions options ) : List
options ListOptions Options for listing the objects. After calling /// ListAccessTokens, be sure to check the value of the token property to see /// if there are additional results.
리턴 List

ListDirectory() 공개 메소드

Lists the contents of a directory.
public ListDirectory ( ObjectPath path ) : List
path ObjectPath the path to list. Must be a directory.
리턴 List

ListDirectory() 공개 메소드

Lists the contents of a directory.
public ListDirectory ( ObjectPath path, ListOptions options ) : List
path ObjectPath the path to list. Must be a directory.
options ListOptions Options for listing the objects. After calling /// ListObjects, be sure to check the value of the token property to see /// if there are additional results.
리턴 List

ListObjects() 공개 메소드

Lists all objects with the given tag.
if no objects are found (code 1003)
public ListObjects ( MetadataTag tag ) : List
tag MetadataTag Tag the tag to search for
리턴 List

ListObjects() 공개 메소드

Lists all objects with the given tag.
if no objects are found (code 1003)
public ListObjects ( string tag ) : List
tag string Tag the tag to search for
리턴 List

ListObjects() 공개 메소드

Lists all objects with the given tag.
if no objects are found (code 1003)
public ListObjects ( MetadataTag tag, ListOptions options ) : List
tag MetadataTag Tag the tag to search for
options ListOptions Options for listing the objects. After calling ListObjects, be sure to check the value of the token property to see if there are additional results.
리턴 List

ListObjects() 공개 메소드

Lists all objects with the given tag.
if no objects are found (code 1003)
public ListObjects ( string tag, ListOptions options ) : List
tag string Tag the tag to search for
options ListOptions Options for listing the objects. After calling ListObjects, be sure to check the value of the token property to see if there are additional results.
리턴 List

ListObjectsWithMetadata() 공개 메소드

Lists all objects with the given tag. This method returns both the objects' IDs as well as their metadata.
if no objects are found (code 1003)
public ListObjectsWithMetadata ( MetadataTag tag ) : List
tag MetadataTag Tag the tag to search for
리턴 List

ListObjectsWithMetadata() 공개 메소드

Lists all objects with the given tag. This method returns both the objects' IDs as well as their metadata.
if no objects are found (code 1003)
public ListObjectsWithMetadata ( string tag ) : List
tag string Tag the tag to search for
리턴 List

ListUserMetadataTags() 공개 메소드

Returns the list of user metadata tags assigned to the object.
public ListUserMetadataTags ( Identifier id ) : MetadataTags
id Identifier The object whose metadata tags to list
리턴 MetadataTags

ListVersions() 공개 메소드

Lists the versions of an object.
public ListVersions ( Identifier id ) : List
id Identifier The object whose versions to list.
리턴 List

QueryObjects() 공개 메소드

Executes a query for objects matching the specified XQuery string.
public QueryObjects ( string xquery ) : List
xquery string The XQuery string to execute against the cloud.
리턴 List

ReadObject() 공개 메소드

Reads an object's content.
public ReadObject ( Identifier id, Extent extent, byte buffer ) : byte[]
id Identifier the identifier of the object whose content to read.
extent Extent the portion of the object data to read. Optional. If null, the entire object will be read.
buffer byte the buffer to use to read the extent. Must be large enough to read the response or an error will be thrown. If null, a buffer will be allocated to hold the response data. If you pass a buffer that is larger than the extent, only extent.getSize() bytes will be valid.
리턴 byte[]

ReadObject() 공개 메소드

Reads an object's content.
public ReadObject ( Identifier id, Extent extent, byte buffer, Checksum checksum ) : byte[]
id Identifier the identifier of the object whose content to read.
extent Extent the portion of the object data to read. Optional. If null, the entire object will be read.
buffer byte the buffer to use to read the extent. Must be large enough to read the response or an error will be thrown. If null, a buffer will be allocated to hold the response data. If you pass a buffer that is larger than the extent, only extent.getSize() bytes will be valid.
checksum Checksum checksum if not null, the given checksum object will be used /// to verify checksums during the read operation. Note that only erasure coded objects /// will return checksums *and* if you're reading the object in chunks, you'll have to /// read the data back sequentially to keep the checksum consistent. If the read operation /// does not return a checksum from the server, the checksum operation will be skipped.
리턴 byte[]

ReadObjectExtents() 공개 메소드

Reads content from multiple extents within an object using a single call.
public ReadObjectExtents ( Identifier id ) : MultipartEntity
id Identifier the identifier of the object whose content to read.
리턴 MultipartEntity

ReadObjectStream() 공개 메소드

Fetches object content as a stream
public ReadObjectStream ( Identifier id, Extent extent ) : ReadObjectStreamResponse
id Identifier the identifier of the object whose content to read.
extent Extent the portion of the object data to read. Optional. If null, the entire object will be read.
리턴 ReadObjectStreamResponse

Rename() 공개 메소드

Renames a file or directory within the namespace.
public Rename ( ObjectPath source, ObjectPath destination, bool force ) : void
source ObjectPath The file or directory to rename
destination ObjectPath The new path for the file or directory
force bool If true, the desination file or /// directory will be overwritten. Directories must be empty to be /// overwritten.
리턴 void

RestoreVersion() 공개 메소드

Restores a version of an object to the base version (i.e. "promote" an old version to the current version).
public RestoreVersion ( ObjectId id, ObjectId vId ) : void
id ObjectId Base object ID (target of the restore)
vId ObjectId Version object ID to restore
리턴 void

Set100Continue() 공개 메소드

By default, when posting data .Net will not post a body on the first request and tell the server it expects "100 Continue". After getting "100 Continue" it then posts the data. This is done to avoid sending the body when redirects or errors occur but can be detrimental to performance since more round trips are required.
public Set100Continue ( bool enabled ) : void
enabled bool Set to true to enable continue behavior. Set to false to disable it.
리턴 void

SetAcl() 공개 메소드

Sets the access control list on the object.
public SetAcl ( Identifier id, Acl acl ) : void
id Identifier The identifier of the object whose ACL to change
acl Acl The new ACL for the object.
리턴 void

SetUserMetadata() 공개 메소드

Writes the metadata into the object. If the tag does not exist, it is created and set to the corresponding value. If the tag exists, the existing value is replaced.
public SetUserMetadata ( Identifier id, MetadataList metadata ) : void
id Identifier The identifier of the object to update
metadata MetadataList Metadata to write to the object.
리턴 void

UpdateObject() 공개 메소드

Updates an object in the cloud.
public UpdateObject ( Identifier id, Acl acl, MetadataList metadata, Extent extent, byte data, string mimeType ) : void
id Identifier The ID of the object to update
acl Acl Access control list for the new object. Optional, set to NULL to leave the ACL unchanged.
metadata MetadataList Metadata list for the new object. Optional, set to NULL for no changes to the metadata.
extent Extent portion of the object to update. May be null to indicate the whole object is to be replaced. If not null, the extent size must match the data size.
data byte The new contents of the object. May be appended to later. Optional, set to null for no content changes.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 void

UpdateObject() 공개 메소드

Updates an object in the cloud.
public UpdateObject ( Identifier id, Acl acl, MetadataList metadata, Extent extent, byte data, string mimeType, Checksum checksum ) : void
id Identifier The ID of the object to update
acl Acl Access control list for the new object. Optional, set to NULL to leave the ACL unchanged.
metadata MetadataList Metadata list for the new object. Optional, set to NULL for no changes to the metadata.
extent Extent portion of the object to update. May be null to indicate the whole object is to be replaced. If not null, the extent size must match the data size.
data byte The new contents of the object. May be appended to later. Optional, set to null for no content changes.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 void

UpdateObjectFromSegment() 공개 메소드

Updates an object in the cloud.
public UpdateObjectFromSegment ( Identifier id, Acl acl, MetadataList metadata, Extent extent, ArraySegment data, string mimeType ) : void
id Identifier The ID of the object to update
acl Acl Access control list for the new object. Optional, set to NULL to leave the ACL unchanged.
metadata MetadataList Metadata list for the new object. Optional, set to NULL for no changes to the metadata.
extent Extent portion of the object to update. May be null to indicate the whole object is to be replaced. If not null, the extent size must match the data size.
data ArraySegment The new contents of the object. May be appended to later. Optional, set to null for no content changes.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
리턴 void

UpdateObjectFromSegment() 공개 메소드

Updates an object in the cloud.
public UpdateObjectFromSegment ( Identifier id, Acl acl, MetadataList metadata, Extent extent, ArraySegment data, string mimeType, Checksum checksum ) : void
id Identifier The ID of the object to update
acl Acl Access control list for the new object. Optional, set to NULL to leave the ACL unchanged.
metadata MetadataList Metadata list for the new object. Optional, set to NULL for no changes to the metadata.
extent Extent portion of the object to update. May be null to indicate the whole object is to be replaced. If not null, the extent size must match the data size.
data ArraySegment The new contents of the object. May be appended to later. Optional, set to null for no content changes.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 void

UpdateObjectFromStream() 공개 메소드

Updates an object in the cloud.
public UpdateObjectFromStream ( Identifier id, Acl acl, MetadataList metadata, Extent extent, Stream data, long streamLength, string mimeType, Checksum checksum ) : void
id Identifier The ID of the object to update
acl Acl Access control list for the new object. Optional, set to NULL to leave the ACL unchanged.
metadata MetadataList Metadata list for the new object. Optional, set to NULL for no changes to the metadata.
extent Extent portion of the object to update. May be null to indicate the whole object is to be replaced. If not null, the extent size must match the data size.
data Stream The initial contents of the object. Note that we only read 'streamLength' bytes from the stream and do not close the stream.
streamLength long The number of bytes to read from the stream. Must be <= the actual stream length.
mimeType string the MIME type of the content. Optional, may be null. If data is non-null and mimeType is null, the MIME type will default to application/octet-stream.
checksum Checksum the checksum object to use to compute checksums. If you're doing incremental updates after the create, include the same object in subsequent calls. Can be null to omit checksums.
리턴 void

VersionObject() 공개 메소드

Creates a new immutable version of an object.
public VersionObject ( Identifier id ) : ObjectId
id Identifier The object to version
리턴 ObjectId

buildUrl() 보호된 메소드

protected buildUrl ( string resource ) : Uri
resource string
리턴 System.Uri

getShareableUrl() 공개 메소드

An Atmos user (UID) can construct a pre-authenticated URL to an object, which may then be used by anyone to retrieve the object (e.g., through a browser). This allows an Atmos user to let a non-Atmos user download a specific object. The entire object/file is read.
public getShareableUrl ( Identifier id, System.DateTime expiration ) : Uri
id Identifier the object to generate the URL for
expiration System.DateTime expiration the expiration date of the URL. Note, be sure to ensure your expiration is in UTC (DateTimeKind.Utc)
리턴 System.Uri

프로퍼티 상세

port 보호되어 있는 프로퍼티

The port number for Atmos. Generally, this is 80 for HTTP and 443 for HTTPS.
protected int port
리턴 int

protocol 보호되어 있는 프로퍼티

The protocol used. Generally, this is "http", or "https"
protected string protocol
리턴 string