Offer class
메서드
read(Request |
지정된 제품대한 OfferDefinition 읽습니다. 예시
|
replace(Offer |
지정된 제품 지정된 OfferDefinition바꿉다. 예시 Offer를 업데이트된 처리량이 있는 새 Offer 정의로 바꾸기
|
속성 세부 정보
client
id
id: string
속성 값
string
url
리소스에 대한 참조 URL을 반환합니다. 사용 권한에서 연결에 사용됩니다.
string url
속성 값
string
메서드 세부 정보
read(RequestOptions)
지정된 제품대한 OfferDefinition 읽습니다.
예시
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>
매개 변수
- options
- RequestOptions
반환
Promise<OfferResponse>
replace(OfferDefinition, RequestOptions)
지정된 제품 지정된 OfferDefinition바꿉다.
예시
Offer를 업데이트된 처리량이 있는 새 Offer 정의로 바꾸기
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>
매개 변수
- body
- OfferDefinition
지정된 OfferDefinition
- options
- RequestOptions
반환
Promise<OfferResponse>