spaces_info

Generated on 7 May 2025 from digitalocean.cloud version v1.2.1

Synopsis

Requirements

  • pydo >= 0.1.3
  • azure-core >= 1.26.1
  • boto3 >= 1.28.53

Parameters

Parameter Choices Default Comments
aws_access_key_id
(str)
The AWS_ACCESS_KEY_ID to use for authentication. The AWS_ACCESS_KEY_ID environment variable will be used.
aws_secret_access_key
(str)
The AWS_SECRET_ACCESS_KEY to use for authentication. The AWS_SECRET_ACCESS_KEY environment variable will be used.
client_override_options
(dict)
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options.
module_override_options
(dict)
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options.
name
(str)
The short name of the Space to list. If not provided all the Spaces in region will be returned. For example, given name=my-do-space and region=nyc3, the managed Space will be https://my-do-space.nyc3.digitaloceanspace.com.
region
(str)
The region in which to list Spaces. The SPACES_REGION environment variable will be used.
state
(str)
  • present
  • absent
present State of the resource, present to create, absent to destroy.
timeout
(int)
300 Polling timeout in seconds.
token
(str)
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN, DIGITALOCEAN_TOKEN, DO_API_TOKEN, DO_API_KEY, DO_OAUTH_TOKEN and OAUTH_TOKEN

Examples

- name: Get all Spaces in nyc3
  digitalocean.cloud.spaces_info:
    aws_access_key_id: "{{ aws_access_key_id}}"
    aws_secret_access_key: "{{ aws_secret_access_key}}"
    region: "nyc3"

- name: Get Space my-do-space in nyc3
  digitalocean.cloud.spaces_info:
    aws_access_key_id: "{{ aws_access_key_id}}"
    aws_secret_access_key: "{{ aws_secret_access_key}}"
    name: "my-do-space"
    region: "nyc3"

Return Values

Key Returned Description
error
(dict)
failure DigitalOcean Spaces boto response metadata.

Sample:

{
  "HTTPHeaders": "Header metadata key/values",
  "HTTPStatusCode": 400,
  "HostId": "Host ID data as a hash",
  "RequestId": "1234567890ABCDEF",
  "RetryAttempts\u0027": 0
}
msg
(str)
always Spaces result information.

Sample:

[
  "Current Spaces in nyc3",
  "Existing Space named my-do-space in nyc3",
  "No Spaces in sfo3",
  "No Space named my-do-space in nyc3",
  "Failed to list Spaces in nyc3"
]
spaces
(list)
always Current spaces.

Sample:

{
  "endpoint_url": "https://nyc3.digitaloceanspaces.com",
  "name": "my-do-space",
  "region": "nyc3",
  "space_url": "https://my-do-space.nyc3.digitaloceanspaces.com"
}

We can't find any results for your search.

Try using different keywords or simplifying your search terms.