Class: ClusterRole
Extends
KubeObjectInternal
<KubeRole
,this
>
Constructors
new ClusterRole()
new ClusterRole(json: KubeRole, cluster?: string): ClusterRole
Parameters
Parameter | Type |
---|---|
json | KubeRole |
cluster ? | string |
Returns
Inherited from
makeKubeObject<KubeRole>().constructor
Defined in
Properties
Property | Modifier | Type | Default value | Description | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|---|---|
_clusterName | public | string | undefined | - | - | makeKubeObject<KubeRole>()._clusterName | src/lib/k8s/KubeObject.ts:29 |
jsonData | public | KubeRole | undefined | - | - | makeKubeObject<KubeRole>().jsonData | src/lib/k8s/KubeObject.ts:26 |
_internalApiEndpoint? | static | ApiWithNamespaceClient <KubeObjectInterface > | ApiClient <KubeObjectInterface > | undefined | - | - | makeKubeObject<KubeRole>()._internalApiEndpoint | src/lib/k8s/KubeObject.ts:43 |
apiName | static | string | 'clusterroles' | Name of the resource, plural, used in API | makeKubeObject<KubeRole>().apiName | - | src/lib/k8s/clusterRole.ts:6 |
apiVersion | static | string | 'rbac.authorization.k8s.io/v1' | Group and version of the resource formatted as "GROUP/VERSION", e.g. "policy.k8s.io/v1". | makeKubeObject<KubeRole>().apiVersion | - | src/lib/k8s/clusterRole.ts:7 |
isNamespaced | static | boolean | false | Whether the object is namespaced. | makeKubeObject<KubeRole>().isNamespaced | - | src/lib/k8s/clusterRole.ts:8 |
kind | static | string | 'ClusterRole' | The kind of the object. Corresponding to the resource kind in Kubernetes. | makeKubeObject<KubeRole>().kind | - | src/lib/k8s/clusterRole.ts:5 |
readOnlyFields | static | string [] | [] | Readonly field defined as JSONPath paths | - | makeKubeObject<KubeRole>().readOnlyFields | src/lib/k8s/KubeObject.ts:28 |
Accessors
cluster
get cluster(): string
set cluster(cluster: string): void
Parameters
Parameter | Type |
---|---|
cluster | string |
Returns
string
Inherited from
makeKubeObject<KubeRole>().cluster
Defined in
detailsRoute
get detailsRoute(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().detailsRoute
Defined in
isNamespaced
get isNamespaced(): boolean
Returns
boolean
Inherited from
makeKubeObject<KubeRole>().isNamespaced
Defined in
kind
get kind(): any
Returns
any
Inherited from
makeKubeObject<KubeRole>().kind
Defined in
listRoute
get listRoute(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().listRoute
Defined in
metadata
get metadata(): KubeMetadata
Returns
Inherited from
makeKubeObject<KubeRole>().metadata
Defined in
pluralName
get pluralName(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().pluralName
Defined in
rules
get rules(): object[]
Returns
object
[]
Defined in
apiEndpoint
get static apiEndpoint(): ApiWithNamespaceClient<KubeObjectInterface> | ApiClient<KubeObjectInterface>
set static apiEndpoint(endpoint: ApiWithNamespaceClient<KubeObjectInterface> | ApiClient<KubeObjectInterface>): void
Parameters
Parameter | Type |
---|---|
endpoint | ApiWithNamespaceClient <KubeObjectInterface > | ApiClient <KubeObjectInterface > |
Returns
ApiWithNamespaceClient
<KubeObjectInterface
> | ApiClient
<KubeObjectInterface
>
Inherited from
makeKubeObject<KubeRole>().apiEndpoint
Defined in
className
get static className(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().className
Defined in
detailsRoute
get static detailsRoute(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().detailsRoute
Defined in
listRoute
get static listRoute(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().listRoute
Defined in
pluralName
get static pluralName(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().pluralName
Defined in
Methods
_class()
_class(): typeof KubeObject
Returns
typeof KubeObject
Inherited from
makeKubeObject<KubeRole>()._class
Defined in
delete()
delete(): Promise<any>
Returns
Promise
<any
>
Inherited from
makeKubeObject<KubeRole>().delete
Defined in
getAge()
getAge(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().getAge
Defined in
getAuthorization()
getAuthorization(verb: string, reqResourseAttrs?: AuthRequestResourceAttrs): Promise<any>
Parameters
Parameter | Type |
---|---|
verb | string |
reqResourseAttrs ? | AuthRequestResourceAttrs |
Returns
Promise
<any
>
Inherited from
makeKubeObject<KubeRole>().getAuthorization
Defined in
getCreationTs()
getCreationTs(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().getCreationTs
Defined in
getDetailsLink()
getDetailsLink(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().getDetailsLink
Defined in
getEditableObject()
getEditableObject(): object
Returns
object
Inherited from
makeKubeObject<KubeRole>().getEditableObject
Defined in
getListLink()
getListLink(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().getListLink
Defined in
getName()
getName(): string
Returns
string
Inherited from
makeKubeObject<KubeRole>().getName
Defined in
getNamespace()
getNamespace(): undefined | string
Returns
undefined
| string
Inherited from
makeKubeObject<KubeRole>().getNamespace
Defined in
getValue()
getValue(prop: string): any
Parameters
Parameter | Type |
---|---|
prop | string |
Returns
any
Inherited from
makeKubeObject<KubeRole>().getValue
Defined in
patch()
patch(body: OpPatch[]): Promise<any>
Parameters
Parameter | Type |
---|---|
body | OpPatch [] |
Returns
Promise
<any
>
Inherited from
makeKubeObject<KubeRole>().patch
Defined in
scale()
scale(numReplicas: number): Promise<any>
Parameters
Parameter | Type |
---|---|
numReplicas | number |
Returns
Promise
<any
>
Inherited from
makeKubeObject<KubeRole>().scale
Defined in
update()
update(data: KubeObjectInterface): Promise<KubeObjectInterface>
Parameters
Parameter | Type |
---|---|
data | KubeObjectInterface |
Returns
Promise
<KubeObjectInterface
>
Inherited from
makeKubeObject<KubeRole>().update
Defined in
apiGet()
static apiGet<K>(
this: (...args: any) => K & typeof KubeObject,
onGet: (...args: any) => void,
name: string,
namespace?: string,
onError?: (err: null | ApiError, cluster?: string) => void,
opts?: object): (...args: any[]) => Promise<CancelFunction>
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
onGet | (...args : any ) => void |
name | string |
namespace ? | string |
onError ? | (err : null | ApiError , cluster ?: string ) => void |
opts ? | object |
opts.cluster ? | string |
opts.queryParams ? | QueryParameters |
Returns
Function
Parameters
Parameter | Type |
---|---|
...args | any [] |
Returns
Promise
<CancelFunction
>
Inherited from
makeKubeObject<KubeRole>().apiGet
Defined in
apiList()
static apiList<K>(
this: (...args: any) => K & typeof KubeObject,
onList: (arg: K[]) => void,
onError?: (err: ApiError, cluster?: string) => void,
opts?: ApiListSingleNamespaceOptions): (...args: any[]) => Promise<CancelFunction>
Returns the API endpoint for this object.
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type | Description |
---|---|---|
this | (...args : any ) => K & typeof KubeObject | - |
onList | (arg : K []) => void | Callback function to be called when the list is retrieved. |
onError ? | (err : ApiError , cluster ?: string ) => void | Callback function to be called when an error occurs. |
opts ? | ApiListSingleNamespaceOptions | Options to be passed to the API endpoint. |
Returns
Function
The API endpoint for this object.
Parameters
Parameter | Type |
---|---|
...args | any [] |
Returns
Promise
<CancelFunction
>
Inherited from
makeKubeObject<KubeRole>().apiList
Defined in
create()
static create<Args, T>(this: (...args: Args) => T, ...item: Args): T
Type Parameters
Type Parameter |
---|
Args extends any [] |
T extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : Args ) => T |
...item | Args |
Returns
T
Inherited from
makeKubeObject<KubeRole>().create
Defined in
fetchAuthorization()
static fetchAuthorization(reqResourseAttrs?: AuthRequestResourceAttrs): Promise<any>
Performs a request to check if the user has the given permission.
Parameters
Parameter | Type |
---|---|
reqResourseAttrs ? | AuthRequestResourceAttrs |
Returns
Promise
<any
>
The result of the access request.
Inherited from
makeKubeObject<KubeRole>().fetchAuthorization
Defined in
getAuthorization()
static getAuthorization(verb: string, reqResourseAttrs?: AuthRequestResourceAttrs): Promise<any>
Parameters
Parameter | Type |
---|---|
verb | string |
reqResourseAttrs ? | AuthRequestResourceAttrs |
Returns
Promise
<any
>
Inherited from
makeKubeObject<KubeRole>().getAuthorization
Defined in
getBaseObject()
static getBaseObject(): Omit<KubeObjectInterface, "metadata"> & object
Returns
Omit
<KubeObjectInterface
, "metadata"
> & object
Inherited from
makeKubeObject<KubeRole>().getBaseObject
Defined in
getErrorMessage()
static getErrorMessage(err: null | ApiError): null | "Error: Not found" | "Error: No permissions" | "Error"
Parameters
Parameter | Type |
---|---|
err | null | ApiError |
Returns
null
| "Error: Not found"
| "Error: No permissions"
| "Error"
Inherited from
makeKubeObject<KubeRole>().getErrorMessage
Defined in
put()
static put(data: KubeObjectInterface): Promise<KubeObjectInterface>
Parameters
Parameter | Type |
---|---|
data | KubeObjectInterface |
Returns
Promise
<KubeObjectInterface
>
Inherited from
makeKubeObject<KubeRole>().put
Defined in
useApiGet()
static useApiGet<K>(
this: (...args: any) => K & typeof KubeObject,
onGet: (item: null | K) => any,
name: string,
namespace?: string,
onError?: (err: null | ApiError, cluster?: string) => void,
opts?: object): void
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
onGet | (item : null | K ) => any |
name | string |
namespace ? | string |
onError ? | (err : null | ApiError , cluster ?: string ) => void |
opts ? | object |
opts.cluster ? | string |
opts.queryParams ? | QueryParameters |
Returns
void
Inherited from
makeKubeObject<KubeRole>().useApiGet
Defined in
useApiList()
static useApiList<K>(
this: (...args: any) => K & typeof KubeObject,
onList: (...arg: any[]) => any,
onError?: (err: ApiError, cluster?: string) => void,
opts?: ApiListOptions): void
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
onList | (...arg : any []) => any |
onError ? | (err : ApiError , cluster ?: string ) => void |
opts ? | ApiListOptions |
Returns
void
Inherited from
makeKubeObject<KubeRole>().useApiList
Defined in
useGet()
static useGet<K>(
this: (...args: any) => K,
name: string,
namespace?: string,
opts?: object): [null | K, null | ApiError] & QueryResponse<K, ApiError>
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K |
name | string |
namespace ? | string |
opts ? | object |
opts.cluster ? | string |
opts.queryParams ? | QueryParameters |
Returns
[null
| K
, null
| ApiError
] & QueryResponse
<K
, ApiError
>
Inherited from
makeKubeObject<KubeRole>().useGet
Defined in
useList()
static useList<K>(this: (...args: any) => K & typeof KubeObject, __namedParameters: object & QueryParameters): [null | K[], null | ApiError] & QueryListResponse<(undefined | null | ListResponse<K>)[], K, ApiError>
Type Parameters
Type Parameter |
---|
K extends KubeObject <any > |
Parameters
Parameter | Type |
---|---|
this | (...args : any ) => K & typeof KubeObject |
__namedParameters | object & QueryParameters |
Returns
[null
| K
[], null
| ApiError
] & QueryListResponse
<(undefined
| null
| ListResponse
<K
>)[], K
, ApiError
>
Inherited from
makeKubeObject<KubeRole>().useList