Offer class
Tulajdonságok
| client | |
| id | |
| url | Az erőforrás hivatkozási URL-címét adja vissza. Az engedélyek csatolásához használatos. |
Metódusok
| read(Request |
Olvassa el az adott AjánlatOfferDefinition. Példa
|
| replace(Offer |
Cserélje le a megadott Ajánlati a megadott OfferDefinition. Példa Cserélje le az ajánlatot egy új, frissített átviteli sebességű ajánlatdefinícióra
|
Tulajdonság adatai
client
id
id: string
Tulajdonság értéke
string
url
Az erőforrás hivatkozási URL-címét adja vissza. Az engedélyek csatolásához használatos.
string url
Tulajdonság értéke
string
Metódus adatai
read(RequestOptions)
Olvassa el az adott AjánlatOfferDefinition.
Példa
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>
Paraméterek
- options
- RequestOptions
Válaszok
Promise<OfferResponse>
replace(OfferDefinition, RequestOptions)
Cserélje le a megadott Ajánlati a megadott OfferDefinition.
Példa
Cserélje le az ajánlatot egy új, frissített átviteli sebességű ajánlatdefinícióra
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>
Paraméterek
- body
- OfferDefinition
A megadott OfferDefinition
- options
- RequestOptions
Válaszok
Promise<OfferResponse>