api_service#

State module for managing Kubernetes APIService.

async idem_k8s.states.k8s.apiregistration_k8s_io.v1.api_service.present(hub, ctx, name: str, metadata: metadata, spec: spec, resource_id: str = None) Dict[str, Any][source]#

Creates an APIService.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – An identifier of the resource in the provider. Defaults to None.

  • metadata (dict) – Standard object’s metadata. More info: Kubernetes metadata reference

  • spec (dict) – Spec contains information for locating and communicating with a server. More info: Kubernetes spec reference

Request Syntax:
[api_service-name]:
   k8s.apiregistration_k8s_io.v1.api_service.present:
     - name: 'string'
     - metadata: Dict
     - spec: Dict
     - resource_id: 'string'
Returns:

Dict[str, Any]

Examples

resource_is_present:
  k8s.apiregistration_k8s_io.v1.api_service.present:
    - name: 'test-api-service'
    - metadata:
        labels:
          k8s-app: metrics-server
        name: v1beta1.metrics.k8s.io
    - spec:
        group: metrics.k8s.io
        group_priority_minimum: 100
        insecure_skip_tls_verify: true
        service:
          name: metrics-server
          namespace: kube-system
        version: v1beta1
        version_priority: 100
async idem_k8s.states.k8s.apiregistration_k8s_io.v1.api_service.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes an APIService.

Parameters:
  • name (str, Optional) – An Idem name of the resource.

  • resource_id (str, Optional) – An identifier of the resource in the provider. Defaults to None.

Request Syntax:
[api-service-name]:
   k8s.apiregistration_k8s_io.v1.api_service.absent:
     - name: 'string'
     - resource_id: 'string'
Returns:

Dict[str, Any]

Examples

resource_is_absent:
  k8s.apiregistration_k8s_io.v1.api_service.absent:
    - name: "test-api-service"
    - resource_id: "test-api-service"
async idem_k8s.states.k8s.apiregistration_k8s_io.v1.api_service.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describes the resource in a way that can be recreated/managed with the corresponding “present” function.

list or watch objects of kind APIService.

Returns:

Dict[str, Any]

Examples

$ idem describe k8s.apiregistration_k8s_io.v1.api_service