TableServiceClient class
TableServiceClient는 테이블 및 엔터티에 대한 작업을 수행할 수 있는 Azure Tables 서비스에 대한 클라이언트를 나타냅니다.
생성자
Table |
TableServiceClient 클래스의 새 인스턴스를 만듭니다. |
Table |
TableServiceClient 클래스의 새 인스턴스를 만듭니다. |
Table |
TableServiceClient 클래스의 새 인스턴스를 만듭니다. |
Table |
TableServiceClient 클래스의 새 인스턴스를 만듭니다. |
속성
pipeline | URL에 대한 HTTP 요청을 만들기 위한 파이프라인을 나타냅니다. 파이프라인에는 서버에 대한 요청 전후에 각 요청 조작을 관리하는 여러 정책이 있을 수 있습니다. |
url | 테이블 계정 URL |
메서드
create |
지정된 계정 아래에 새 테이블을 만듭니다. |
delete |
작업은 지정된 테이블을 영구적으로 삭제합니다. |
from |
연결 문자열에서 TableServiceClient의 인스턴스를 만듭니다. |
get |
분석 및 CORS(원본 간 리소스 공유) 규칙에 대한 속성을 포함하여 계정의 Table Service 속성을 가져옵니다. |
get |
Table Service의 복제와 관련된 통계를 검색합니다. 계정에 대해 읽기 액세스 지역 중복 복제를 사용하도록 설정한 경우에만 보조 위치 엔드포인트에서 사용할 수 있습니다. |
list |
지정된 계정의 테이블을 쿼리합니다. |
set |
분석 및 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입니다. 노드에 대해서만 지원됨
- 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 Storage 계정의 계정 연결 문자열 또는 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)
분석 및 CORS(원본 간 리소스 공유) 규칙에 대한 속성을 포함하여 계정의 Table Service 속성을 가져옵니다.
function getProperties(options?: OperationOptions): Promise<ServiceGetPropertiesResponse>
매개 변수
- options
- OperationOptions
옵션 매개 변수입니다.
반환
Promise<GetPropertiesResponse>
getStatistics(OperationOptions)
Table Service의 복제와 관련된 통계를 검색합니다. 계정에 대해 읽기 액세스 지역 중복 복제를 사용하도록 설정한 경우에만 보조 위치 엔드포인트에서 사용할 수 있습니다.
function getStatistics(options?: OperationOptions): Promise<ServiceGetStatisticsResponse>
매개 변수
- options
- OperationOptions
옵션 매개 변수입니다.
반환
Promise<GetStatisticsResponse>
listTables(ListTableItemsOptions)
지정된 계정의 테이블을 쿼리합니다.
function listTables(options?: ListTableItemsOptions): PagedAsyncIterableIterator<TableItem, TableItemResultPage, PageSettings>
매개 변수
- options
- ListTableItemsOptions
옵션 매개 변수입니다.
반환
setProperties(TableServiceProperties, ServiceSetPropertiesOptionalParams)
분석 및 CORS(원본 간 리소스 공유) 규칙에 대한 속성을 포함하여 계정의 Table Service 엔드포인트에 대한 속성을 설정합니다.
function setProperties(properties: TableServiceProperties, options?: ServiceSetPropertiesOptionalParams): Promise<ServiceSetPropertiesHeaders>
매개 변수
- properties
- ServiceProperties
Table Service 속성입니다.
- options
- SetPropertiesOptions
옵션 매개 변수입니다.
반환
Promise<ServiceSetPropertiesHeaders>