-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11576 from linode/staging
Release v1.135.0 - staging → master
- Loading branch information
Showing
255 changed files
with
8,039 additions
and
4,729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './types'; | ||
|
||
export * from './quotas'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Filter, Params, ResourcePage as Page } from 'src/types'; | ||
import { API_ROOT } from '../constants'; | ||
import Request, { setMethod, setParams, setURL, setXFilter } from '../request'; | ||
import { Quota, QuotaType } from './types'; | ||
|
||
/** | ||
* getQuota | ||
* | ||
* Returns the details for a single quota within a particular service specified by `type`. | ||
* | ||
* @param type { QuotaType } retrieve a quota within this service type. | ||
* @param id { number } the quota ID to look up. | ||
*/ | ||
export const getQuota = (type: QuotaType, id: number) => | ||
Request<Quota>(setURL(`${API_ROOT}/${type}/quotas/${id}`), setMethod('GET')); | ||
|
||
/** | ||
* getQuotas | ||
* | ||
* Returns a paginated list of quotas for a particular service specified by `type`. | ||
* | ||
* This request can be filtered on `quota_name`, `service_name` and `scope`. | ||
* | ||
* @param type { QuotaType } retrieve quotas within this service type. | ||
*/ | ||
export const getQuotas = ( | ||
type: QuotaType, | ||
params: Params = {}, | ||
filter: Filter = {} | ||
) => | ||
Request<Page<Quota>>( | ||
setURL(`${API_ROOT}/${type}/quotas`), | ||
setMethod('GET'), | ||
setXFilter(filter), | ||
setParams(params) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { ObjectStorageEndpointTypes } from 'src/object-storage'; | ||
import { Region } from 'src/regions'; | ||
|
||
/** | ||
* A Quota is a service used limit that is rated based on service metrics such | ||
* as vCPUs used, instances or storage size. | ||
*/ | ||
export interface Quota { | ||
/** | ||
* A unique identifier for the quota. | ||
*/ | ||
quota_id: number; | ||
|
||
/** | ||
* Customer facing label describing the quota. | ||
*/ | ||
quota_name: string; | ||
|
||
/** | ||
* Longer explanatory description for the quota. | ||
*/ | ||
description: string; | ||
|
||
/** | ||
* The account-wide limit for this service, measured in units | ||
* specified by the `resource_metric` field. | ||
*/ | ||
quota_limit: number; | ||
|
||
/** | ||
* Current account usage, measured in units specified by the | ||
* `resource_metric` field. | ||
*/ | ||
used: number; | ||
|
||
/** | ||
* The unit of measurement for this service limit. | ||
*/ | ||
resource_metric: | ||
| 'instance' | ||
| 'CPU' | ||
| 'GPU' | ||
| 'VPU' | ||
| 'cluster' | ||
| 'node' | ||
| 'bucket' | ||
| 'object' | ||
| 'byte'; | ||
|
||
/** | ||
* The region slug to which this limit applies. | ||
*/ | ||
region_applied: Region['id'] | 'global'; | ||
|
||
/** | ||
* The OBJ endpoint type to which this limit applies. | ||
* | ||
* For OBJ limits only. | ||
*/ | ||
endpoint_type?: ObjectStorageEndpointTypes; | ||
|
||
/** | ||
* The S3 endpoint URL to which this limit applies. | ||
* | ||
* For OBJ limits only. | ||
*/ | ||
s3_endpoint?: string; | ||
} | ||
|
||
export type QuotaType = 'linode' | 'lke' | 'object-storage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.