cloudera.cloud.df_customflow module – Import or Delete CustomFlows into the DataFlow Catalog

Note

This module is part of the cloudera.cloud collection (version 3.3.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.df_customflow.

New in cloudera.cloud 2.0.0

Synopsis

  • Import or Delete CustomFlows into the DataFlow Catalog

Parameters

Parameter

Comments

access_key

string

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 CDP_ACCESS_KEY_ID.

Required if private_key is provided.

Mutually exclusive with credentials_path.

collection_crn

string

The CRN of the collection into which the flow definition will be imported.

If unspecified, the flow will not be assigned to a collection.

Default: "None"

comments

string

Comments associated to the initial version of the CustomFlow.

Default: "None"

content

string

The CustomFlow definition content as a string (JSON format).

Mutually exclusive with file.

Default: "None"

credentials_path

string

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 CDP_CREDENTIALS_PATH.

Default: "~/.cdp/credentials"

debug

aliases: debug_endpoints

boolean

If true, the module will capture the Cloudera on cloud HTTP log and return it in the sdk_out and sdk_out_lines fields.

Choices:

  • false ← (default)

  • true

description

string

The description of the CustomFlow.

Default: "None"

endpoint

aliases: endpoint_url, url

string

The Cloudera on cloud API endpoint to use.

If not provided, the API will attempt to use the value from the environment variable CDP_ENDPOINT_URL.

Mutually exclusive with endpoint_region.

endpoint_region

aliases: cdp_endpoint_region, cdp_region, region

string

Specify the Cloudera on cloud API endpoint region.

See Cloudera Control Plane regions for more information.

If not provided, the API will attempt to use the value from the environment variable CDP_REGION.

default is an alias for the us-west-1 region.

Mutually exclusive with endpoint.

Choices:

  • "default"

  • "us-west-1" ← (default)

  • "eu-1"

  • "ap-1"

endpoint_tls

aliases: verify_endpoint_tls, verify_tls, verify_api_tls

boolean

Verify the TLS certificates for the Cloudera on cloud API endpoint.

Choices:

  • false

  • true ← (default)

file

path

The path to the JSON file containing the CustomFlow definition to be imported from the controller.

Mutually exclusive with content.

Default: "None"

http_agent

aliases: agent_header

string

The HTTP user agent to use for Cloudera on cloud API requests.

Default: "cloudera.cloud"

name

aliases: flow_name

string / required

The name of the CustomFlow to be acted upon.

private_key

string

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 CDP_PRIVATE_KEY.

Required if access_key is provided.

profile

string

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 CDP_PROFILE.

Default: "default"

state

string

The declarative state of the CustomFlow

Choices:

  • "present" ← (default)

  • "absent"

strict

aliases: strict_errors

boolean

Legacy CDPy SDK error handling.

Choices:

  • false ← (default)

  • true

tags

list / elements=dictionary

The list of tags for the initial flow definition version.

Each tag should have a tags[].tag_name (required) and optionally a tags[].tag_color.

tag_color

string

The color of the version tag.

tag_name

string / required

The name of the version tag.

Examples

# Note: These examples do not set authentication details.


# Import a CustomFlow into the DataFlow Catalog from a file
- cloudera.cloud.df_customflow:
    name: my-customflow-name
    file: /tmp/my-custom-flow.json
    description: My sample CDF flow
    comments: Initial version

# Import a CustomFlow with content from a template/lookup
- cloudera.cloud.df_customflow:
    name: my-customflow-name
    content: "{{ lookup('file', 'my-flow.json') }}"
    description: My sample CDF flow
    comments: Initial version

# Import a CustomFlow into the DataFlow Catalog with collection assignment
- cloudera.cloud.df_customflow:
    name: my-customflow-name
    file: /tmp/my-custom-flow2.json
    collection_crn: crn:cdp:df:us-west-1:tenant:collection:col-123

# Import a CustomFlow with tags
- cloudera.cloud.df_customflow:
    name: my-customflow-name
    file: /tmp/my-custom-flow3.json
    description: My tagged flow
    comments: Initial version with tags
    tags:
      - tag_name: production
        tag_color: blue
      - tag_name: stable
        tag_color: green

# Delete a CustomFlow from the DataFlow Catalog
- cloudera.cloud.df_customflow:
    name: my-customflow-name
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

customflow

dictionary

The CustomFlow Definition

Returned: when supported

createdTimestamp

integer

The timestamp the entry was created.

Returned: always

crn

string

The DataFlow CustomFlow’s CRN.

Use this crn to address this object

Returned: always

description

string

The flow description.

Returned: when available

modifiedTimestamp

integer

The timestamp the entry was last modified.

Returned: always

name

string

The DataFlow CustomFlow’s name.

Returned: always

versionCount

integer

Number of versions contained in this CustomFlow.

Returned: always

versions

list / elements=dictionary

The list of artifactDetail versions.

Returned: always

author

string

The author of the artifact.

Returned: always

bucketIdentifier

string

The bucketIdentifier of the flow.

Returned: always

crn

string

The artifact version CRN.

Returned: always

deploymentCount

integer

The number of deployments of the artifact.

Returned: always

timestamp

integer

The timestamp of the artifact.

Returned: always

version

integer

The version of the artifact.

Returned: always

sdk_out

string

Returns the captured CDP SDK log.

Returned: when supported

sdk_out_lines

list / elements=string

Returns a list of each line of the captured CDP SDK log.

Returned: when supported

Authors

  • Andre Araujo (@asdaraujo)

  • Ronald Suplina (@rsuplina)