本文整理匯總了TypeScript中core/api/ApiService.API.all方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript API.all方法的具體用法?TypeScript API.all怎麽用?TypeScript API.all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類core/api/ApiService.API
的用法示例。
在下文中一共展示了API.all方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getManifest
public static getManifest(account: string, location: string, name: string): IPromise<IManifest> {
return API.all('manifests')
.all(account)
.all(location)
.one(name)
.get();
}
示例2: cancelTask
public static cancelTask(taskId: string): IPromise<void> {
return API.all('tasks')
.one(taskId, 'cancel')
.put()
.then(() =>
TaskReader.getTask(taskId).then(task =>
TaskReader.waitUntilTaskMatches(task, updatedTask => updatedTask.status === 'CANCELED'),
),
);
}
示例3: getLoadBalancerDetails
public getLoadBalancerDetails(
cloudProvider: string,
account: string,
region: string,
name: string,
): IPromise<ILoadBalancerSourceData[]> {
return API.all('loadBalancers')
.all(account)
.all(region)
.all(name)
.withParams({ provider: cloudProvider })
.get();
}
示例4: listMetrics
public static listMetrics(
provider: string,
account: string,
region: string,
filters: any,
): IPromise<ICloudMetricDescriptor[]> {
return API.all('cloudMetrics')
.all(provider)
.all(account)
.all(region)
.withParams(filters)
.getList();
}
示例5: getMetricStatistics
public static getMetricStatistics(
provider: string,
account: string,
region: string,
name: string,
filters: any,
): IPromise<ICloudMetricStatistics> {
return API.all('cloudMetrics')
.all(provider)
.all(account)
.all(region)
.one(name, 'statistics')
.withParams(filters)
.get();
}
示例6: listLoadBalancers
public listLoadBalancers(cloudProvider: string): IPromise<ILoadBalancersByAccount[]> {
return API.all('loadBalancers')
.withParams({ provider: cloudProvider })
.getList();
}
示例7: postTaskCommand
public static postTaskCommand(taskCommand: ITaskCommand): IPromise<ITaskCreateResult> {
return API.all('tasks').post(taskCommand);
}