Skip to main content
Version: v2

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​

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

Methods​

MethodAlertsReturn TypeDescription
createContainer(containerSchema, oldestSupportedClient)Promise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }>Creates a new detached container instance in the Azure Fluid Relay.
createContainer(containerSchema, compatibilityMode)DeprecatedPromise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }>Creates a new detached container instance in the Azure Fluid Relay.
getContainer(id, containerSchema, oldestSupportedClient)Promise<{ container: IFluidContainer<TContainerSchema>; services: AzureContainerServices; }>Accesses the existing container given its unique ID in the Azure Fluid Relay.
getContainer(id, containerSchema, compatibilityMode)DeprecatedPromise<{ 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, oldestSupportedClient)Promise<{ container: IFluidContainer<TContainerSchema>; }>Load a specific version of a container for viewing only.
viewContainerVersion(id, containerSchema, version, compatibilityMode)DeprecatedPromise<{ 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​

ParameterTypeDescription
propertiesAzureClientPropsProperties 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, oldestSupportedClient: OldestSupportedClientVersion): Promise<{
container: IFluidContainer<TContainerSchema>;
services: AzureContainerServices;
}>;
Type Parameters​
ParameterConstraintDescription
TContainerSchemaContainerSchemaUsed to infer the the type of 'initialObjects' in the returned container. (normally not explicitly specified.)

Parameters​

ParameterTypeDescription
containerSchemaTContainerSchemaContainer schema for the new container.
oldestSupportedClientOldestSupportedClientVersionOldest Fluid Framework client version that must be able to open and process documents written by this client. Choosing an older version may limit available features and write formats. Prefer the current Fluid Framework version so the container opts into the latest defaults.

Returns​

New detached container instance along with associated services.

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

createContainer​

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

This API is deprecated and will be removed in a future release.

Pass an OldestSupportedClientVersion SemVer string (e.g. "2.0.0") instead. The legacy values "1" and "2" correspond to "1.0.0" and "2.0.0" respectively.

Signature​

createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: AzureContainerServices;
}>;
Type Parameters​
ParameterConstraintDescription
TContainerSchemaContainerSchemaUsed to infer the the type of 'initialObjects' in the returned container. This does not normally need to be specified explicitly.

Parameters​

ParameterTypeDescription
containerSchemaTContainerSchemaContainer schema for the new container.
compatibilityModeCompatibilityModeLegacy CompatibilityMode value.

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, oldestSupportedClient: OldestSupportedClientVersion): Promise<{
container: IFluidContainer<TContainerSchema>;
services: AzureContainerServices;
}>;
Type Parameters​
ParameterConstraintDescription
TContainerSchemaContainerSchemaUsed to infer the the type of 'initialObjects' in the returned container. (normally not explicitly specified.)

Parameters​

ParameterTypeDescription
idstringUnique ID of the container in Azure Fluid Relay.
containerSchemaTContainerSchemaContainer schema used to access data objects in the container.
oldestSupportedClientOldestSupportedClientVersionOldest Fluid Framework client version that must be able to open and process documents written by this client. Choosing an older version may limit available features and write formats. Prefer the current Fluid Framework version so the container opts into the latest defaults.

Returns​

Existing 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.

This API is deprecated and will be removed in a future release.

Pass an OldestSupportedClientVersion SemVer string (e.g. "2.0.0") instead. The legacy values "1" and "2" correspond to "1.0.0" and "2.0.0" respectively.

Signature​

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

Parameters​

ParameterTypeDescription
idstringUnique ID of the container in Azure Fluid Relay.
containerSchemaTContainerSchemaContainer schema used to access data objects in the container.
compatibilityModeCompatibilityModeLegacy CompatibilityMode value.

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​

ParameterModifiersTypeDescription
idstringUnique ID of the source container in Azure Fluid Relay.
optionsoptionalAzureGetVersionsOptions"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, oldestSupportedClient: OldestSupportedClientVersion): Promise<{
container: IFluidContainer<TContainerSchema>;
}>;
Type Parameters​
ParameterConstraintDescription
TContainerSchemaContainerSchemaUsed to infer the the type of 'initialObjects' in the returned container. (normally not explicitly specified.)

Parameters​

ParameterTypeDescription
idstringUnique ID of the source container in Azure Fluid Relay.
containerSchemaTContainerSchemaContainer schema used to access data objects in the container.
versionAzureContainerVersionUnique version of the source container in Azure Fluid Relay.
oldestSupportedClientOldestSupportedClientVersionOldest Fluid Framework client version that must be able to open and process documents written by this client. Choosing an older version may limit available features and write formats. Prefer the current Fluid Framework version so the container opts into the latest defaults.

Returns​

Loaded container instance at the specified version.

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

viewContainerVersion​

Load a specific version of a container for viewing only.

This API is deprecated and will be removed in a future release.

Pass an OldestSupportedClientVersion SemVer string (e.g. "2.0.0") instead. The legacy values "1" and "2" correspond to "1.0.0" and "2.0.0" respectively.

Signature​

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

Parameters​

ParameterTypeDescription
idstringUnique ID of the source container in Azure Fluid Relay.
containerSchemaTContainerSchemaContainer schema used to access data objects in the container.
versionAzureContainerVersionUnique version of the source container in Azure Fluid Relay.
compatibilityModeCompatibilityModeLegacy CompatibilityMode value.

Returns​

Loaded container instance at the specified version.

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