Skip to content

# Class: PodsApi

## Hierarchy

- KubeApi‹Pod›

↳ PodsApi

## Index

### Constructors

- constructor

### Properties

- apiBase
- apiGroup
- apiPrefix
- apiResource
- apiVersion
- apiVersionPreferred
- isNamespaced
- kind
- objectConstructor
- options
- request
- resourceVersions
- parseApi

### Accessors

- apiVersionWithGroup

### Methods

- checkPreferredVersion
- create
- delete
- get
- getLogs
- getMetrics
- getResourceVersion
- getUrl
- getWatchUrl
- list
- normalizeQuery
- parseResponse
- refreshResourceVersion
- setResourceVersion
- update
- watch
- watchAll

## Constructors

### constructor

+ new PodsApi(`options`: IKubeApiOptions‹Pod›): PodsApi

Inherited from KubeApi.constructor

Defined in src/renderer/api/kube-api.ts:114

Parameters:

Name | Type
--- | ---
`options` | IKubeApiOptions‹Pod›

Returns: PodsApi

## Properties

### apiBase

• apiBase: string

Inherited from KubeApi.apiBase

Defined in src/renderer/api/kube-api.ts:104

### apiGroup

• apiGroup: string

Inherited from KubeApi.apiGroup

Defined in src/renderer/api/kube-api.ts:106

### apiPrefix

• apiPrefix: string

Inherited from KubeApi.apiPrefix

Defined in src/renderer/api/kube-api.ts:105

### apiResource

• apiResource: string

Inherited from KubeApi.apiResource

Defined in src/renderer/api/kube-api.ts:109

### apiVersion

• apiVersion: string

Inherited from KubeApi.apiVersion

Defined in src/renderer/api/kube-api.ts:107

### `Optional` apiVersionPreferred

• apiVersionPreferred? : string

Inherited from KubeApi.apiVersionPreferred

Defined in src/renderer/api/kube-api.ts:108

### isNamespaced

• isNamespaced: boolean

Inherited from KubeApi.isNamespaced

Defined in src/renderer/api/kube-api.ts:110

### kind

• kind: string

Inherited from KubeApi.kind

Defined in src/renderer/api/kube-api.ts:103

### objectConstructor

• objectConstructor: IKubeObjectConstructor‹Pod›

Inherited from KubeApi.objectConstructor

Defined in src/renderer/api/kube-api.ts:112

### `Protected` options

• options: IKubeApiOptions‹Pod›

Inherited from KubeApi.options

Defined in src/renderer/api/kube-api.ts:116

### `Protected` request

• request: KubeJsonApi

Inherited from KubeApi.request

Defined in src/renderer/api/kube-api.ts:113

### `Protected` resourceVersions

• resourceVersions: Map‹string, string› = new Map()

Inherited from KubeApi.resourceVersions

Defined in src/renderer/api/kube-api.ts:114

### `Static` parseApi

▪ parseApi: parseKubeApi = parseKubeApi

Inherited from KubeApi.parseApi

Defined in src/renderer/api/kube-api.ts:95

## Accessors

### apiVersionWithGroup

• get apiVersionWithGroup(): string

Inherited from KubeApi.apiVersionWithGroup

Defined in src/renderer/api/kube-api.ts:144

Returns: string

## Methods

### `Protected` checkPreferredVersion

▸ checkPreferredVersion(): Promise‹void›

Inherited from KubeApi.checkPreferredVersion

Defined in src/renderer/api/kube-api.ts:206

Returns: Promise‹void›

### create

▸ create(`__namedParameters`: object, `data?`: Partial‹Pod›): Promise‹Pod›

Inherited from KubeApi.create

Defined in src/renderer/api/kube-api.ts:326

Parameters:

▪`Default value` __namedParameters: object= {}

Name | Type | Default
--- | --- | ---
`name` | string | ""
`namespace` | string | "default"

▪`Optional` data: Partial‹Pod›

Returns: Promise‹Pod›

### delete

▸ delete(`__namedParameters`: object): Promise‹KubeJsonApiData›

Inherited from KubeApi.delete

Defined in src/renderer/api/kube-api.ts:353

Parameters:

▪ __namedParameters: object

Name | Type | Default
--- | --- | ---
`name` | string | ""
`namespace` | string | "default"

Returns: Promise‹KubeJsonApiData›

### get

▸ get(`__namedParameters`: object, `query?`: IKubeApiQueryParams): Promise‹Pod›

Inherited from KubeApi.get

Defined in src/renderer/api/kube-api.ts:318

Parameters:

▪`Default value` __namedParameters: object= {}

Name | Type | Default
--- | --- | ---
`name` | string | ""
`namespace` | string | "default"

▪`Optional` query: IKubeApiQueryParams

Returns: Promise‹Pod›

### getLogs

▸ getLogs(`params`: object, `query?`: IPodLogsQuery): Promise‹string›

Defined in src/renderer/api/endpoints/pods.api.ts:7

Parameters:

▪ params: object

Name | Type
--- | ---
`name` | string
`namespace` | string

▪`Optional` query: IPodLogsQuery

Returns: Promise‹string›

### getMetrics

▸ getMetrics(`pods`: Pod[], `namespace`: string, `selector`: string): Promise‹IPodMetrics›

Defined in src/renderer/api/endpoints/pods.api.ts:13

Parameters:

Name | Type | Default
--- | --- | ---
`pods` | Pod[] | -
`namespace` | string | -
`selector` | string | "pod, namespace"

Returns: Promise‹IPodMetrics›

### getResourceVersion

▸ getResourceVersion(`namespace`: string): string

Inherited from KubeApi.getResourceVersion

Defined in src/renderer/api/kube-api.ts:239

Parameters:

Name | Type | Default
--- | --- | ---
`namespace` | string | ""

Returns: string

### getUrl

▸ getUrl(`__namedParameters`: object, `query?`: Partial‹IKubeApiQueryParams›): string

Inherited from KubeApi.getUrl

Defined in src/renderer/api/kube-api.ts:247

Parameters:

▪`Default value` __namedParameters: object= {}

Name | Type | Default
--- | --- | ---
`name` | string | ""
`namespace` | string | ""

▪`Optional` query: Partial‹IKubeApiQueryParams›

Returns: string

### getWatchUrl

▸ getWatchUrl(`namespace`: string, `query`: IKubeApiQueryParams): string

Inherited from KubeApi.getWatchUrl

Defined in src/renderer/api/kube-api.ts:360

Parameters:

Name | Type | Default
--- | --- | ---
`namespace` | string | ""
`query` | IKubeApiQueryParams | {}

Returns: string

### list

▸ list(`__namedParameters`: object, `query?`: IKubeApiQueryParams): Promise‹Pod[]›

Inherited from KubeApi.list

Defined in src/renderer/api/kube-api.ts:310

Parameters:

▪`Default value` __namedParameters: object= {}

Name | Type | Default
--- | --- | ---
`namespace` | string | ""

▪`Optional` query: IKubeApiQueryParams

Returns: Promise‹Pod[]›

### `Protected` normalizeQuery

▸ normalizeQuery(`query`: Partial‹IKubeApiQueryParams›): object

Inherited from KubeApi.normalizeQuery

Defined in src/renderer/api/kube-api.ts:259

Parameters:

Name | Type | Default
--- | --- | ---
`query` | Partial‹IKubeApiQueryParams› | {}

Returns: object

### `Protected` parseResponse

▸ parseResponse(`data`: KubeJsonApiData | KubeJsonApiData[] | KubeJsonApiDataList, `namespace?`: string): any

Inherited from KubeApi.parseResponse

Defined in src/renderer/api/kube-api.ts:271

Parameters:

Name | Type
--- | ---
`data` | KubeJsonApiData | KubeJsonApiData[] | KubeJsonApiDataList
`namespace?` | string

Returns: any

### refreshResourceVersion

▸ refreshResourceVersion(`params?`: object): Promise‹T[]›

Inherited from KubeApi.refreshResourceVersion

Defined in src/renderer/api/kube-api.ts:243

Parameters:

▪`Optional` params: object

Name | Type
--- | ---
`namespace` | string

Returns: Promise‹T[]›

### setResourceVersion

▸ setResourceVersion(`namespace`: string, `newVersion`: string): void

Inherited from KubeApi.setResourceVersion

Defined in src/renderer/api/kube-api.ts:235

Parameters:

Name | Type | Default
--- | --- | ---
`namespace` | string | ""
`newVersion` | string | -

Returns: void

### update

▸ update(`__namedParameters`: object, `data?`: Partial‹Pod›): Promise‹Pod›

Inherited from KubeApi.update

Defined in src/renderer/api/kube-api.ts:344

Parameters:

▪`Default value` __namedParameters: object= {}

Name | Type | Default
--- | --- | ---
`name` | string | ""
`namespace` | string | "default"

▪`Optional` data: Partial‹Pod›

Returns: Promise‹Pod›

### watch

▸ watch(): function

Inherited from KubeApi.watch

Defined in src/renderer/api/kube-api.ts:368

Returns: function

▸ (): void

### `Static` watchAll

▸ watchAll(...`apis`: KubeApi[]): (Anonymous function)

Inherited from KubeApi.watchAll

Defined in src/renderer/api/kube-api.ts:97

Parameters:

Name | Type
--- | ---
`...apis` | KubeApi[]

Returns: (Anonymous function)