Offer class
Yöntemler
| read(Request |
Verilen Teklifiiçin OfferDefinition okuyun. Örnek
|
| replace(Offer |
Verilen Teklifi belirtilen OfferDefinitionile değiştirin. Örnek Teklifi, güncelleştirilmiş aktarım hızına sahip yeni bir teklif tanımıyla değiştirin
|
Özellik Ayrıntıları
client
id
id: string
Özellik Değeri
string
url
Kaynağa bir başvuru URL'si döndürür. İzinler'de bağlantı için kullanılır.
string url
Özellik Değeri
string
Yöntem Ayrıntıları
read(RequestOptions)
Verilen Teklifiiçin OfferDefinition okuyun.
Örnek
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 { resource: offer } = await client.offer("<offer-id>").read();
function read(options?: RequestOptions): Promise<OfferResponse>
Parametreler
- options
- RequestOptions
Döndürülenler
Promise<OfferResponse>
replace(OfferDefinition, RequestOptions)
Verilen Teklifi belirtilen OfferDefinitionile değiştirin.
Örnek
Teklifi, güncelleştirilmiş aktarım hızına sahip yeni bir teklif tanımıyla değiştirin
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 { resource: offer } = await client.offer("<offer-id>").read();
// @ts-preservewhitespace
offer.content.offerThroughput = 1000;
await client.offer("<offer-id>").replace(offer);
function replace(body: OfferDefinition, options?: RequestOptions): Promise<OfferResponse>
Parametreler
- body
- OfferDefinition
Belirtilen OfferDefinition
- options
- RequestOptions
Döndürülenler
Promise<OfferResponse>