cloudera.cloud.compute_usage_info module – Gather information about compute usage records
Note
This module is part of the cloudera.cloud collection (version 3.1.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install cloudera.cloud.
To use it in a playbook, specify: cloudera.cloud.compute_usage_info.
New in cloudera.cloud 3.2.0
Synopsis
Gather information about compute usage records for a Cloudera on cloud tenant.
The module supports
check_mode.
Parameters
Parameter |
Comments |
|---|---|
If provided, the Cloudera on cloud API will use this value as its access key. If not provided, the API will attempt to use the value from the environment variable Required if Mutually exclusive with |
|
If provided, the Cloudera on cloud API will use this value as its credentials path. If not provided, the API will attempt to use the value from the environment variable Default: |
|
If Choices:
|
|
The Cloudera on cloud API endpoint to use. |
|
The starting timestamp (ISO format) for the search range (inclusive). |
|
The HTTP user agent to use for Cloudera on cloud API requests. Default: |
|
If provided, the Cloudera on cloud API will use this value as its private key. If not provided, the API will attempt to use the value from the environment variable Required if |
|
If provided, the Cloudera on cloud API will use this value as its profile. If not provided, the API will attempt to use the value from the environment variable Default: |
|
The ending timestamp (ISO format) for the search range (exclusive). |
Examples
# Note: These examples do not set authentication details.
- name: Gather information about compute usage records
cloudera.cloud.compute_usage_info:
from_timestamp: "2023-01-01T00:00:00Z"
to_timestamp: "2023-01-31T23:59:59Z"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Returns a list of compute usage records. Each record represents the aggregated hourly usage. Returned: always |
|
The cloud provider for the running cluster. Returned: when supported Sample: |
|
The cluster CRN. Returned: when supported |
|
The cluster name. Returned: always |
|
The template used to create the cluster. Returned: when supported |
|
The cluster type. Returned: always Sample: |
|
The environment CRN for the cluster. Returned: always |
|
The environment name for the cluster. Returned: always |
|
Number of credits consumed for the compute usage record. Returned: always |
|
Total number of hours for which the instances were running. Returned: always |
|
Total number of instances in use. Returned: always |
|
The instance type for the cluster. Returned: always |
|
Rate in credits at which usage is charged for given cluster type, instance type, and cloud provider. Returned: always |
|
Quantity of usage of the cluster. Returned: always |
|
Type of usage by the cluster. Returned: always Sample: |
|
The service feature for the cluster. Returned: when supported |
|
Timestamp of end of the usage (ISO format). Returned: always |
|
Timestamp of start of the usage (ISO format). Returned: always |
|
User-defined tags assigned to the cluster. Returns a JSON-encoded string of key-value pairs. Returned: when supported |
|
Returns the captured API HTTP log. Returned: when supported |
|
Returns a list of each line of the captured API HTTP log. Returned: when supported |