次の方法で共有


TableServiceClient class

TableServiceClient は、Azure Tables サービスへのクライアントを表し、テーブルとエンティティに対して操作を実行できます。

コンストラクター

TableServiceClient(string, NamedKeyCredential, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

TableServiceClient(string, SASCredential, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

TableServiceClient(string, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

TableServiceClient(string, TokenCredential, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

プロパティ

pipeline

URL への HTTP 要求を行うパイプラインを表します。 パイプラインには、サーバーに対して行われる前と後の各要求の操作を管理するための複数のポリシーを含めることができます。

url

テーブル アカウントの URL

メソッド

createTable(string, OperationOptions)

指定されたアカウントの下に新しいテーブルを作成します。

deleteTable(string, OperationOptions)

操作によって、指定したテーブルが完全に削除されます。

fromConnectionString(string, TableServiceClientOptions)

接続文字列から TableServiceClient のインスタンスを作成します。

getProperties(OperationOptions)

Analytics および CORS (クロスオリジン リソース共有) ルールのプロパティを含む、アカウントの Table Service のプロパティを取得します。

getStatistics(OperationOptions)

Table service のレプリケーションに関連する統計を取得します。 これは、アカウントに対して読み取りアクセス geo 冗長レプリケーションが有効になっている場合にのみ、セカンダリ ロケーション エンドポイントで使用できます。

listTables(ListTableItemsOptions)

指定されたアカウントのテーブルにクエリを実行します。

setProperties(TableServiceProperties, ServiceSetPropertiesOptionalParams)

Analytics および CORS (クロスオリジン リソース共有) ルールのプロパティを含む、アカウントの Table Service エンドポイントのプロパティを設定します。

コンストラクターの詳細

TableServiceClient(string, NamedKeyCredential, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

new TableServiceClient(url: string, credential: NamedKeyCredential, options?: TableServiceClientOptions)

パラメーター

url

string

目的の操作のターゲットであるサービス アカウントの URL。"https://myaccount.table.core.windows.net"など)。

credential
NamedKeyCredential

NamedKeyCredential |要求の認証に使用される SASCredential。 Node でのみサポートされます

options
TableServiceClientOptions

HTTP パイプラインを構成するためのオプション。

アカウント名/キーの使用例:

import { AzureNamedKeyCredential, TableServiceClient } from "@azure/data-tables";

const account = "<account>";
const accountKey = "<accountkey>";

const credential = new AzureNamedKeyCredential(account, accountKey);
const serviceClient = new TableServiceClient(
  `https://${account}.table.core.windows.net`,
  credential,
);

TableServiceClient(string, SASCredential, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

new TableServiceClient(url: string, credential: SASCredential, options?: TableServiceClientOptions)

パラメーター

url

string

目的の操作のターゲットであるサービス アカウントの URL。"https://myaccount.table.core.windows.net"など)。

credential
SASCredential

要求の認証に使用される SASCredential

options
TableServiceClientOptions

HTTP パイプラインを構成するためのオプション。

SAS トークンの使用例。

import { TableServiceClient, AzureSASCredential } from "@azure/data-tables";

const account = "<account name>";
const sas = "<service Shared Access Signature Token>";

const serviceClientWithSAS = new TableServiceClient(
  `https://${account}.table.core.windows.net`,
  new AzureSASCredential(sas),
);

TableServiceClient(string, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

new TableServiceClient(url: string, options?: TableServiceClientOptions)

パラメーター

url

string

目的の操作のターゲットであるサービス アカウントの URL。"https://myaccount.table.core.windows.net"など)。 "https://myaccount.table.core.windows.net?sasString" など、SAS を追加できます。

options
TableServiceClientOptions

HTTP パイプラインを構成するためのオプション。 SAS トークンの追加例:

import { TableServiceClient } from "@azure/data-tables";

const account = "<account name>";
const sasToken = "<SAS token>";
const tableName = "<tableName>";

const serviceClientWithSASURL = new TableServiceClient(
  `https://${account}.table.core.windows.net?${sasToken}`,
);

TableServiceClient(string, TokenCredential, TableServiceClientOptions)

TableServiceClient クラスの新しいインスタンスを作成します。

new TableServiceClient(url: string, credential: TokenCredential, options?: TableServiceClientOptions)

パラメーター

url

string

目的の操作のターゲットであるサービス アカウントの URL。"https://myaccount.table.core.windows.net"など)。

credential
TokenCredential

要求の認証に使用される Azure Active Directory 資格情報

options
TableServiceClientOptions

HTTP パイプラインを構成するためのオプション。

Azure Active Directory 資格情報の使用例:

import { DefaultAzureCredential } from "@azure/identity";
import { TableServiceClient } from "@azure/data-tables";

const credential = new DefaultAzureCredential();
const account = "<account name>";

const clientWithAAD = new TableServiceClient(
  `https://${account}.table.core.windows.net`,
  credential,
);

プロパティの詳細

pipeline

URL への HTTP 要求を行うパイプラインを表します。 パイプラインには、サーバーに対して行われる前と後の各要求の操作を管理するための複数のポリシーを含めることができます。

pipeline: Pipeline

プロパティ値

url

テーブル アカウントの URL

url: string

プロパティ値

string

メソッドの詳細

createTable(string, OperationOptions)

指定されたアカウントの下に新しいテーブルを作成します。

function createTable(name: string, options?: OperationOptions): Promise<void>

パラメーター

name

string

テーブルの名前。

options
OperationOptions

オプション パラメーター。

戻り値

Promise<void>

deleteTable(string, OperationOptions)

操作によって、指定したテーブルが完全に削除されます。

function deleteTable(name: string, options?: OperationOptions): Promise<void>

パラメーター

name

string

テーブルの名前。

options
OperationOptions

オプション パラメーター。

戻り値

Promise<void>

fromConnectionString(string, TableServiceClientOptions)

接続文字列から TableServiceClient のインスタンスを作成します。

static function fromConnectionString(connectionString: string, options?: TableServiceClientOptions): TableServiceClient

パラメーター

connectionString

string

アカウント接続文字列または Azure ストレージ アカウントの SAS 接続文字列。 [ 注 - アカウント接続文字列は、NODE.JSランタイムでのみ使用できます。 ] アカウント接続文字列の例 - DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net SAS 接続文字列の例 - BlobEndpoint=https://myaccount.table.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString

options
TableServiceClientOptions

HTTP パイプラインを構成するためのオプション。

戻り値

指定された接続文字列からの新しい TableServiceClient。

getProperties(OperationOptions)

Analytics および CORS (クロスオリジン リソース共有) ルールのプロパティを含む、アカウントの Table Service のプロパティを取得します。

function getProperties(options?: OperationOptions): Promise<ServiceGetPropertiesResponse>

パラメーター

options
OperationOptions

オプション パラメーター。

戻り値

getStatistics(OperationOptions)

Table service のレプリケーションに関連する統計を取得します。 これは、アカウントに対して読み取りアクセス geo 冗長レプリケーションが有効になっている場合にのみ、セカンダリ ロケーション エンドポイントで使用できます。

function getStatistics(options?: OperationOptions): Promise<ServiceGetStatisticsResponse>

パラメーター

options
OperationOptions

オプション パラメーター。

戻り値

listTables(ListTableItemsOptions)

指定されたアカウントのテーブルにクエリを実行します。

function listTables(options?: ListTableItemsOptions): PagedAsyncIterableIterator<TableItem, TableItemResultPage, PageSettings>

パラメーター

options
ListTableItemsOptions

オプション パラメーター。

戻り値

setProperties(TableServiceProperties, ServiceSetPropertiesOptionalParams)

Analytics および CORS (クロスオリジン リソース共有) ルールのプロパティを含む、アカウントの Table Service エンドポイントのプロパティを設定します。

function setProperties(properties: TableServiceProperties, options?: ServiceSetPropertiesOptionalParams): Promise<ServiceSetPropertiesHeaders>

パラメーター

properties
ServiceProperties

Table Service のプロパティ。

options
SetPropertiesOptions

オプション パラメーター。

戻り値