key_ring#

State module for managing Cloud Key Management Service key rings.

async idem_gcp.states.gcp.cloudkms.key_ring.present(hub, ctx, name: str, key_ring_id: str = None, project_id: str = None, location_id: str = None, resource_id: str = None) Dict[str, Any][source]#

Create a new KeyRing in a given Project and Location.

Parameters:
  • name (str) – Idem name.

  • key_ring_id (str, Optional) – Key ring id.

  • project_id (str, Optional) – Project id.

  • location_id (str, Optional) – Location id.

  • resource_id (str, Optional) – Idem resource id. Formatted as projects/{project_id}/locations/{location_id}/keyRings/{key_ring_id}

Returns:

Dict[str, Any]

Examples

key_ring_present:
  gcp.cloudkms.key_ring.present:
    - key_ring_id: idem-gcp
    - project_id: tango-gcp
    - location_id: us-east1
async idem_gcp.states.gcp.cloudkms.key_ring.absent(hub, ctx, name: str) Dict[str, Any][source]#

Absent opreation is not supported for this resource.

Parameters:

name (str) – Idem name.

Returns:

{
    "result": False,
    "comment": "...",
    "old_state": None,
    "new_state": None,
}

async idem_gcp.states.gcp.cloudkms.key_ring.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.

Retrieve the list of available key rings.

Returns:

Dict[str, Any]

Examples

$ idem describe gcp.cloudkms.key_ring
idem_gcp.states.gcp.cloudkms.key_ring.is_pending(hub, ret: dict, state: str = None, **pending_kwargs) bool[source]#

Default implemented for each module.