다음을 통해 공유


Conflict class

ID별로 지정된 충돌 읽거나 삭제하는 데 사용합니다.

모든 충돌을 쿼리하거나 읽으려면 충돌 참조하세요.

속성

container
id
url

리소스에 대한 참조 URL을 반환합니다. 사용 권한에서 연결에 사용됩니다.

메서드

delete(RequestOptions)

지정된 ConflictDefinition삭제합니다.

예시

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

await container.conflict("<conflict-id>").delete();
read(RequestOptions)

지정된 충돌대한 ConflictDefinition 읽습니다.

예시

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

const { resource: conflict } = await container.conflict("<conflict-id>").read();

속성 세부 정보

container

container: Container

속성 값

id

id: string

속성 값

string

url

리소스에 대한 참조 URL을 반환합니다. 사용 권한에서 연결에 사용됩니다.

string url

속성 값

string

메서드 세부 정보

delete(RequestOptions)

지정된 ConflictDefinition삭제합니다.

예시

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

await container.conflict("<conflict-id>").delete();
function delete(options?: RequestOptions): Promise<ConflictResponse>

매개 변수

options
RequestOptions

반환

Promise<ConflictResponse>

read(RequestOptions)

지정된 충돌대한 ConflictDefinition 읽습니다.

예시

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

const { resource: conflict } = await container.conflict("<conflict-id>").read();
function read(options?: RequestOptions): Promise<ConflictResponse>

매개 변수

options
RequestOptions

반환

Promise<ConflictResponse>