Make an arbitrary Linode API request.
The Linode API documentation can be found here: https://techdocs.akamai.com/linode-api/reference
Field | Type | Required | Description |
---|---|---|---|
api_token |
str |
Required | The Linode account personal access token. It is necessary to run the module. It can be exposed by the environment variable LINODE_API_TOKEN instead. See details in Usage. |
- name: Get all available LKE versions
linode.cloud.api_request:
path: lke/versions
method: GET
- name: Manually create a domain
linode.cloud.api_request:
path: domains
method: POST
body:
domain: my-domain.com
type: master
soa_email: [email protected]
Field | Type | Required | Description |
---|---|---|---|
path |
str |
Required | The relative path to the endpoint to make a request to. e.g. "linode/instances" |
method |
str |
Required | The HTTP method of the request or response. (Choices: POST , PUT , GET , DELETE ) |
body |
dict |
Optional | The body of the request. This is a YAML structure that will be marshalled to JSON. (Conflicts With: body_json ) |
body_json |
str |
Optional | The body of the request in JSON format. (Conflicts With: body ) |
filters |
dict |
Optional | A YAML structure corresponding to the X-Filter request header. See: https://techdocs.akamai.com/linode-api/reference |
-
body
- The deserialized response body.- Sample Response:
{ "axfr_ips": [], "description": null, "domain": "example.org", "expire_sec": 300, "group": null, "id": 1234, "master_ips": [], "refresh_sec": 300, "retry_sec": 300, "soa_email": "[email protected]", "status": "active", "tags": [ "example tag", "another example" ], "ttl_sec": 300, "type": "master" }
- Sample Response:
-
status
- The response status code.- Sample Response:
200
- Sample Response: