Delen via


Conflict class

Gebruik dit om een bepaalde conflict op id te lezen of te verwijderen.

Zie conflicten om alle conflicten op te vragen of te lezen.

Eigenschappen

container
id
url

Retourneert een referentie-URL naar de resource. Wordt gebruikt voor het koppelen in machtigingen.

Methoden

delete(RequestOptions)

Verwijder de opgegeven ConflictDefinition-.

Voorbeeld

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)

Lees de ConflictDefinition- voor de gegeven Conflict.

Voorbeeld

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();

Eigenschapdetails

container

container: Container

Waarde van eigenschap

id

id: string

Waarde van eigenschap

string

url

Retourneert een referentie-URL naar de resource. Wordt gebruikt voor het koppelen in machtigingen.

string url

Waarde van eigenschap

string

Methodedetails

delete(RequestOptions)

Verwijder de opgegeven ConflictDefinition-.

Voorbeeld

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>

Parameters

options
RequestOptions

Retouren

Promise<ConflictResponse>

read(RequestOptions)

Lees de ConflictDefinition- voor de gegeven Conflict.

Voorbeeld

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>

Parameters

options
RequestOptions

Retouren

Promise<ConflictResponse>