cluster_role#
State module for managing Kubernetes ClusterRole.
- async idem_k8s.states.k8s.rbac.v1.cluster_role.present(hub, ctx, name: str, metadata: Dict, aggregation_rule: Dict = None, rules: List = None, resource_id: str = None) Dict[str, Any] [source]#
Create a ClusterRole
- Parameters:
name (str) – An Idem name of the resource.
resource_id (str, Optional) – An identifier of the resource in the provider. Defaults to None.
aggregation_rule (dict, Optional) – AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
metadata (dict) – Standard object’s metadata.
rules (list, Optional) – Rules holds all the PolicyRules for this ClusterRole.
- Returns:
Dict[str, Any]
Examples
resource_is_present: k8s.rbac.v1.cluster_role.present: - name: value - metadata: name: idem-test-cluster-role - rules: - api_groups: - test.com resources: - vaconfigs verbs: - get - list - watch
- async idem_k8s.states.k8s.rbac.v1.cluster_role.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any] [source]#
Delete a ClusterRole
- Parameters:
- Returns:
Dict[str, Any]
Examples
resource_is_absent: k8s.rbac.v1.cluster_role.absent: - name: value - resource_id: value
- async idem_k8s.states.k8s.rbac.v1.cluster_role.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Describe the resource in a way that can be recreated/managed with the corresponding “present” function.
List or watch objects of kind ClusterRole.
- Returns:
Dict[str, Dict[str, Any]]
Examples
$ idem describe k8s.rbac.v1.cluster_role