confluent.cloud.api_key (0.1.0) — module

Manage existing Confluent Cloud API keys

| "added in version" 0.0.1 of confluent.cloud"

Authors: Keith Resar (@keithresar)

Install collection

Install with ansible-galaxy collection install confluent.cloud:==0.1.0


Add to requirements.yml

  collections:
    - name: confluent.cloud
      version: 0.1.0

Description

Manage existing Confluent Cloud API keys within a Confluent Cloud environment.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create new API key
  confluent.cloud.api_key:
    name: application_1_key
    owner: u-j31z28
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete API key (by id)
  confluent.cloud.api_key:
    id: YU6F4EODE4OXXYD4
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete user (by name)
  confluent.cloud.api_key:
    name: application_1_key
    state: absent

Inputs

    
id:
    description: API key Id
    type: str

name:
    description:
    - API key name
    - Mutation after creation requires supplying the user id.
    type: str

owner:
    description:
    - iam.v2.User or iam.v2.ServiceAccount ID that will own the API key.
    - API keys can only be created by the owner of the Confluent Cloud API keys used to
      authenticate this call.
    - Immutable after deployment.
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - If `absent`, the API key will be removed. Note that absent will not cause API key
      to fail if the API key does not exist.
    type: str

api_key:
    description: Confluent Cloud API Key
    required: true
    type: str

resource:
    description:
    - cmk.v2.Cluster id (or null if not associated with a resource).
    - Immutable after deployment.
    type: str

api_secret:
    description: Confluent Cloud API Secret
    required: true
    type: str

api_retries:
    default: 5
    description: Amount of max retries for the API requests.
    type: int

api_timeout:
    default: 60
    description: Timeout used for the API requests.
    type: int

description:
    description: A free-form description of the API key
    type: str

api_endpoint:
    default: https://api.confluent.cloud
    description: Endpoint used for the API requests.
    type: str

validate_certs:
    default: true
    description: Whether to vaidate API endpoint TLS certs
    type: bool

api_retry_max_delay:
    default: 12
    description: Exponential backoff delay in seconds between retries up to this max delay
      value.
    type: int

Outputs

description:
  description: A free-form description of the API key
  returned: success
  sample: API Key 1
  type: str
id:
  description: API key id
  returned: success
  sample: AX6SWFVF46SLIK2P
  type: str
metadata:
  description: User metadata, including create timestamp and updated timestamp
  returned: success
  type: dict
name:
  description: A human-readable name for the API key
  returned: success
  sample: api_key_1
  type: str
owner:
  contains:
    id:
      description: Id for the owner
      returned: success
      sample: u-lgyjxv
      type: str
    kind:
      description: Kind of owner
      returned: success
      sample: User
      type: str
  description: API key owner
  returned: success
  type: dict
resource:
  contains:
    id:
      description: Id for the resource
      returned: success
      sample: lkc-c29js0
      type: str
    kind:
      description: Kind of resource
      returned: success
      sample: User
      type: str
  description: cmk.v2.Cluster id (or null if not associated with a resource).
  returned: success
  type: dict
secret:
  description:
  - The API key secret.
  - Only provided in create requests
  returned: success
  type: str