Skip to main content

AzureClient Class

AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or, when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.

Signature

export declare class AzureClient

Constructors

Constructor Description
(constructor)(properties) Creates a new client instance using configuration parameters.

Methods

Method Return Type Description
createContainer(containerSchema, compatibilityMode) Promise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }> Creates a new detached container instance in the Azure Fluid Relay.
getContainer(id, containerSchema, compatibilityMode) Promise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }> Accesses the existing container given its unique ID in the Azure Fluid Relay.
getContainerVersions(id, options) Promise<AzureContainerVersion[]> Get the list of versions for specific container.
viewContainerVersion(id, containerSchema, version, compatibilityMode) Promise<{ container: IFluidContainer<TContainerSchema>; }> Load a specific version of a container for viewing only.

Constructor Details

(constructor)

Creates a new client instance using configuration parameters.

Signature

constructor(properties: AzureClientProps);

Parameters

Parameter Type Description
properties AzureClientProps Properties for initializing a new AzureClient instance

Method Details

createContainer

Creates a new detached container instance in the Azure Fluid Relay.

Signature

createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: AzureContainerServices;
}>;
Type Parameters
Parameter Constraint Description
TContainerSchema ContainerSchema Used to infer the the type of 'initialObjects' in the returned container. (normally not explicitly specified.)

Parameters

Parameter Type Description
containerSchema TContainerSchema Container schema for the new container.
compatibilityMode CompatibilityMode Compatibility mode the container should run in.

Returns

New detached container instance along with associated services.

Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }>

getContainer

Accesses the existing container given its unique ID in the Azure Fluid Relay.

Signature

getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: AzureContainerServices;
}>;
Type Parameters
Parameter Constraint Description
TContainerSchema ContainerSchema Used to infer the the type of 'initialObjects' in the returned container. (normally not explicitly specified.)

Parameters

Parameter Type Description
id string Unique ID of the container in Azure Fluid Relay.
containerSchema TContainerSchema Container schema used to access data objects in the container.
compatibilityMode CompatibilityMode Compatibility mode the container should run in.

Returns

Existing container instance along with associated services.

Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }>

getContainerVersions

Get the list of versions for specific container.

Signature

getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;

Parameters

Parameter Modifiers Type Description
id string Unique ID of the source container in Azure Fluid Relay.
options optional AzureGetVersionsOptions "Get" options. If options are not provided, API will assume maxCount of versions to retrieve to be 5.

Returns

Array of available container versions.

Return type: Promise<AzureContainerVersion[]>

viewContainerVersion

Load a specific version of a container for viewing only.

Signature

viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
}>;
Type Parameters
Parameter Constraint Description
TContainerSchema ContainerSchema Used to infer the the type of 'initialObjects' in the returned container. (normally not explicitly specified.)

Parameters

Parameter Type Description
id string Unique ID of the source container in Azure Fluid Relay.
containerSchema TContainerSchema Container schema used to access data objects in the container.
version AzureContainerVersion Unique version of the source container in Azure Fluid Relay.
compatibilityMode CompatibilityMode Compatibility mode the container should run in.

Returns

Loaded container instance at the specified version.

Return type: Promise<{ container: IFluidContainer<TContainerSchema>; }>