community.general.scaleway_function_info module – Retrieve information on Scaleway Function

Note

This module is part of the community.general collection (version 9.4.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 community.general.

To use it in a playbook, specify: community.general.scaleway_function_info.

New in community.general 6.0.0

Synopsis

  • This module return information about a function on Scaleway account.

Parameters

Parameter

Comments

api_timeout

aliases: timeout

integer

HTTP timeout to Scaleway API in seconds.

Default: 30

api_token

aliases: oauth_token

string / required

Scaleway OAuth token.

api_url

aliases: base_url

string

Scaleway API URL.

Default: "https://api.scaleway.com"

name

string / required

Name of the function.

namespace_id

string / required

Container namespace identifier.

query_parameters

dictionary

List of parameters passed to the query string.

Default: {}

region

string / required

Scaleway region to use (for example fr-par).

Choices:

  • "fr-par"

  • "nl-ams"

  • "pl-waw"

validate_certs

boolean

Validate SSL certs of the Scaleway API.

Choices:

  • false

  • true ← (default)

Attributes

Attribute

Support

Description

check_mode

Support: full

This action does not modify state.

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: N/A

This action does not modify state.

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

Examples

- name: Get a function info
  community.general.scaleway_function_info:
    namespace_id: '{{ scw_function_namespace }}'
    region: fr-par
    name: my-awesome-function
  register: function_info_task

Return Values

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

Key

Description

function

dictionary

The function information.

Returned: always

Sample: {"cpu_limit": 140, "description": "Function used for testing scaleway_function ansible module", "domain_name": "fnansibletestfxamabuc-fn-ansible-test.functions.fnc.fr-par.scw.cloud", "environment_variables": {"MY_VAR": "my_value"}, "error_message": null, "handler": "handler.handle", "http_option": "", "id": "ceb64dc4-4464-4196-8e20-ecef705475d3", "max_scale": 5, "memory_limit": 256, "min_scale": 0, "name": "fn-ansible-test", "namespace_id": "82737d8d-0ebb-4d89-b0ad-625876eca50d", "privacy": "public", "region": "fr-par", "runtime": "python310", "runtime_message": "", "secret_environment_variables": [{"key": "MY_SECRET_VAR", "value": "$argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg"}], "status": "created", "timeout": "300s"}

Authors

  • Guillaume MARTINEZ (@Lunik)