API Glossary¶
Contents:
This library provides an easy way to script administration tasks for the Pure Storage FlashArray.
When passing arguments to methods that take **kwargs, the exact parameters that can be passed can be found in the REST API guide for the given release of Purity running on the FlashArray.
-
class
purestorage.
FlashArray
(target, username=None, password=None, api_token=None, rest_version=None, verify_https=False, ssl_cert=None, user_agent=None, request_kwargs=None)[source]¶ Represents a Pure Storage FlashArray and exposes administrative APIs.
Parameters: - target (str) – IP address or domain name of the target array’s management interface.
- username (str, optional) – Username of the user with which to log in.
- password (str, optional) – Password of the user with which to log in.
- api_token (str, optional) – API token of the user with which to log in.
- rest_version (str, optional) – REST API version to use when communicating with target array.
- verify_https (bool, optional) – Enable SSL certificate verification for HTTPS requests.
- ssl_cert (str, optional) – Path to SSL certificate or CA Bundle file. Ignored if verify_https=False.
- user_agent (str, optional) – String to be used as the HTTP User-Agent for requests.
- request_kwargs (dict, optional) – Keyword arguments that we will pass into the the call to requests.request.
Raises: - If the target array cannot be found.
- If the target array does not support any of the REST versions used by this library.
- If the username and password or api_token are invalid.
Raises: ValueError
- If no api_token or username and password are specified.
- If an api_token and a username or password are specified.
- If the specified rest_version is not supported by this library or by the target array.
Note
The FlashArray constructor requires either a username and password or an api_token but not both.
Note
If a rest_version is not specified, the FlashArray object uses the highest REST API version supported by both the target array and this library. If the REST API version should become deprecated during the lifetime of the FlashArray object, the object renegotiates a REST version to use and continues running.
Note
If a rest_version is specified, that version is used so long as it is supported by both the target array and this library. In this case, the FlashArray object does not attempt to renegotiate the REST API version.
Note
Valid entries in request_kwargs may vary by your version of requests.
If you wish to use secure connections, we suggest you use an entry in request_kwargs rather than the verify_https and ssl_cert arguments. (e.g. request_kwargs={“verify”: “path/to/ca_bundle”}) You should consider these options deprecated, though we will continue to support them for backward compatibility for the foreseeable future.
-
add_hgroup
(hgroup, pgroup)[source]¶ Add an hgroup to a pgroup.
Parameters: - hgroup (str) – Name of the hgroup to add to pgroup.
- pgroup (str) – pgroup to which to add hgroup.
Returns: A dictionary mapping “name” to hgroup and “protection_group” to pgroup.
Return type: ResponseDict
-
add_host
(host, pgroup)[source]¶ Add a host to a pgroup.
Parameters: - host (str) – Name of the host to add to pgroup.
- pgroup (str) – pgroup to which to add host.
Returns: A dictionary mapping “name” to host and “protection_group” to pgroup.
Return type: ResponseDict
-
add_pod
(pod, array)[source]¶ Add arrays to a pod.
Parameters: - pod (str) – Name of the pod.
- array (str) – Array to add to pod.
Returns: A dictionary mapping “name” to pod and “array” to the pod’s new array list.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
add_tag_to_volume
(volume, key, value, **kwargs)[source]¶ Add tag to volume and return a dictionary describing it.
Parameters: - volume (str) – Name of the volume to add tags to.
- key – The Key to a key-value pair of the tag to add to a volume
- key – The Value to a key-value pair of the tag to add to a volume
- **kwargs – See the REST API Guide on your array for the documentation on the request: POST volume/:volume/tags
Returns: A dictionary describing the tags added to the volume.
Return type: ResponseDict
Note
Add key/value pairs to a volume.
Note
Requires use of REST API 1.19 or later.
-
add_volume
(volume, pgroup)[source]¶ Add a volume to a pgroup.
Parameters: - volume (str) – Name of the volume to add to pgroup.
- pgroup (str) – pgroup to which to add volume.
Returns: A dictionary mapping “name” to volume and “protection_group” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.7 or later.
-
clear_message
(message_id)[source]¶ Clear an alert message or audit record flag.
Parameters: message_id (int or str) – ID of the message to unflag. Returns: A dictionary mapping “id” to message_id. Return type: ResponseDict
-
clone_pod
(source, dest, **kwargs)[source]¶ Clone an existing pod to a new one.
Parameters: - source (str) – Name of the pod the be cloned.
- dest (str) – Name of the target pod to clone into
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pod/:pod
Returns: A dictionary describing the created pod
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
connect_array
(address, connection_key, connection_type, **kwargs)[source]¶ Connect this array with another one.
Parameters: - address (str) – IP address or DNS name of other array.
- connection_key (str) – Connection key of other array.
- connection_type (list) – Type(s) of connection desired.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST array/connection
Returns: A dictionary describing the connection to the other array.
Return type: ResponseDict
Note
Currently, the only type of connection is “replication”.
Note
Requires use of REST API 1.2 or later.
-
connect_azure_offload
(name, **kwargs)[source]¶ Connect an offload Azure Blob target.
Parameters: - name (str) – Name of offload Azure Blob target to be connected.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST offload/azure/{}
Returns: A dictionary describing the Azure Blob target.
Return type: ResponseDict
-
connect_hgroup
(hgroup, volume, **kwargs)[source]¶ Create a shared connection between a host group and a volume.
Parameters: - hgroup (str) – Name of hgroup to connect to volume.
- volume (str) – Name of volume to connect to hgroup.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST hgroup/:hgroup/volume/:volume
Returns: A dictionary describing the connection between the hgroup and volume.
Return type: ResponseDict
-
connect_host
(host, volume, **kwargs)[source]¶ Create a connection between a host and a volume.
Parameters: - host (str) – Name of host to connect to volume.
- volume (str) – Name of volume to connect to host.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST host/:host/volume/:volume
Returns: A dictionary describing the connection between the host and volume.
Return type: ResponseDict
-
connect_nfs_offload
(name, **kwargs)[source]¶ Connect an offload nfs target.
Parameters: - name (str) – Name of offload nfs target to be connected.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST nfs_offload/{}
Returns: A dictionary describing the nfs target.
Return type: ResponseDict
-
connect_s3_offload
(name, **kwargs)[source]¶ Connect an offload S3 target.
Parameters: - name (str) – Name of offload S3 target to be connected.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST s3_offload/{}
Returns: A dictionary describing the S3 target.
Return type: ResponseDict
-
copy_volume
(source, dest, **kwargs)[source]¶ Clone a volume and return a dictionary describing the new volume.
Parameters: - source (str) – Name of the source volume.
- dest (str) – Name of the destination volume.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST volume/:volume
Returns: A dictionary describing the destination volume.
Return type: ResponseDict
-
create_admin
(admin, **kwargs)[source]¶ Create an admin.
Parameters: - admin (str) – Name of admin.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST admin/:admin
Returns: A dictionary describing the new admin.
Return type: ResponseDict
Note
Requires use of REST API 1.14 or later.
-
create_alert_recipient
(address)[source]¶ Add an alert recipient.
Parameters: address (str) – Email address of alert recipient to be created. Returns: A dictionary mapping “name” to address and “enabled” to True. Return type: ResponseDict
-
create_api_token
(admin, **kwargs)[source]¶ Create an API token for an admin.
Parameters: - admin (str) – Name of admin for whom to create an API token.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST admin/:admin/apitoken
Returns: A dictionary describing the new API token.
Return type: ResponseDict
-
create_certificate
(name, **kwargs)[source]¶ Create a new managed certificate.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT cert Returns: A dictionary describing the configured array certificate. Return type: ResponseDict Note
Requires use of REST API 1.12 or later.
You may not create the management certificate, as it already exists.
-
create_conglomerate_volume
(volume)[source]¶ Create a conglomerate volume and return a dictionary describing it.
Parameters: volume (str) – Name of the volume to be created. Returns: A dictionary describing the created conglomerate volume. Return type: ResponseDict Note
This is not a typical volume thus there is no size. It’s main purpose to connect to a host/hgroup to create a PE LUN. Once the conglomerate volume is connected to a host/hgroup, it is used as a protocol-endpoint to connect a vvol to a host/hgroup to allow traffic.
Note
Requires use of REST API 1.13 or later.
-
create_hgroup
(hgroup, **kwargs)[source]¶ Create a host group and return a dictionary describing it.
Parameters: - hgroup (str) – Name of hgroup to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST hgroup/:hgroup
Returns: A dictionary describing the created hgroup
Return type: ResponseDict
-
create_host
(host, **kwargs)[source]¶ Create a host are return a dictionary describing it.
Parameters: - host (str) – Name of host to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST host/:host
Returns: A dictionary describing the created host.
Return type: ResponseDict
-
create_kmip
(name, **kwargs)[source]¶ Create a new kmip configuration.
Parameters: - name (string) – The name of the KMIP config to operate on.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT kmip
Returns: A list of dictionaries describing the kmip configuration.
Return type: ResponseList
Note
Requires use of REST API 1.12 or later.
-
create_pgroup
(pgroup, **kwargs)[source]¶ Create pgroup with specified name.
Parameters: - pgroup (str) – Name of pgroup to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pgroup/:pgroup
Returns: A dictionary describing the created pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
create_pgroup_snapshot
(source, **kwargs)[source]¶ Create snapshot of pgroup from specified source.
Parameters: - source (str) – Name of pgroup of which to take snapshot.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pgroup
Returns: A dictionary describing the created snapshot.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
create_pgroup_snapshots
(sources, **kwargs)[source]¶ Create snapshots of pgroups from specified sources.
Parameters: - sources (list of str) – Names of pgroups of which to take snapshots.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pgroup
Returns: A list of dictionaries describing the created snapshots.
Return type: ResponseList
Note
Requires use of REST API 1.2 or later.
-
create_pod
(pod, **kwargs)[source]¶ Create a pod and return a dictionary describing it.
Parameters: - pod (str) – Name of the pod to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pod
Returns: A dictionary describing the created pod.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
create_pod_replica_link
(local_pod_name, remote_pod_name, **kwargs)[source]¶ Create replica-link.
Parameters: - local_pod_name (str) – local pod name.
- remote_pod_name (str) – remote pod name.
- **kwargs – See the REST API Guide on your array for the documentation on the request: POST pod/replica-link
Returns: a dictionary describing the new replica-link
Return type: ResponseDict
Note
Requires use of REST API 1.19 or later.
-
create_snapshot
(volume, **kwargs)[source]¶ Create a snapshot of the given volume.
Parameters: - volume (str) – Name of the volume of which to take a snapshot.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST volume
Returns: A dictionary describing the new snapshot.
Return type: ResponseDict
-
create_snapshots
(volumes, **kwargs)[source]¶ Create snapshots of the listed volumes.
Parameters: - volumes (list of str) – List of names of the volumes to snapshot.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST volume
Returns: A list of dictionaries describing the new snapshots.
Return type: ResponseDict
-
create_snmp_manager
(manager, host, **kwargs)[source]¶ Create an SNMP manager.
Parameters: - manager (str) – Name of manager to be created.
- host (str) – IP address or DNS name of SNMP server to be used.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST snmp/:manager
Returns: A dictionary describing the created SNMP manager.
Return type: ResponseDict
-
create_subnet
(subnet, prefix, **kwargs)[source]¶ Create a subnet.
Parameters: - subnet (str) – Name of subnet to be created.
- prefix (str) – Routing prefix of subnet to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST subnet/:subnet
Returns: A dictionary describing the created subnet.
Return type: ResponseDict
Note
prefix should be specified as an IPv4 CIDR address. (“xxx.xxx.xxx.xxx/nn”, representing prefix and prefix length)
Note
Requires use of REST API 1.5 or later.
-
create_vgroup
(vgroup, **kwargs)[source]¶ Create a vgroup.
Parameters: - vgroup (str) – Name of vgroup to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST vgroup/:vgroup
Returns: A dictionary mapping “name” to vgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
create_vlan_interface
(interface, subnet, **kwargs)[source]¶ Create a vlan interface
Parameters: - interface (str) – Name of interface to be created.
- subnet (str) – Subnet associated with interface to be created
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST network/vif/:vlan_interface
Returns: A dictionary describing the created interface
Return type: ResponseDict
Note
Requires use of REST API 1.5 or later.
-
create_volume
(volume, size, **kwargs)[source]¶ Create a volume and return a dictionary describing it.
Parameters: - volume (str) – Name of the volume to be created.
- size (int or str) – Size in bytes, or string representing the size of the volume to be created.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST volume/:volume
Returns: A dictionary describing the created volume.
Return type: ResponseDict
Note
The maximum volume size supported is 4 petabytes (4 * 2^50).
Note
If size is an int, it must be a multiple of 512.
Note
If size is a string, it must consist of an integer followed by a valid suffix.
Accepted Suffixes
Suffix Size Bytes S Sector (2^9) K Kilobyte (2^10) M Megabyte (2^20) G Gigabyte (2^30) T Terabyte (2^40) P Petabyte (2^50)
-
delete_admin
(admin)[source]¶ Delete an admin.
Parameters: admin (str) – Name of admin whose API token is to be deleted. Returns: A dictionary mapping “name” to admin and “api_token” to None. Return type: ResponseDict Note
Requires use of REST API 1.14 or later.
-
delete_alert_recipient
(address)[source]¶ Delete an alert recipient.
Parameters: address (str) – Email address of alert recipient to be deleted. Returns: A dictionary mapping “name” to address. Return type: ResponseDict
-
delete_api_token
(admin)[source]¶ Delete the API token of an admin.
Parameters: admin (str) – Name of admin whose API token is to be deleted. Returns: A dictionary mapping “name” to admin and “api_token” to None. Return type: ResponseDict
-
delete_certificate
(name, **kwargs)[source]¶ Delete a managed certificate.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT cert Returns: A dictionary describing the configured array certificate. Return type: ResponseDict Note
Requires use of REST API 1.12 or later.
You may not delete the management certificate.
-
delete_hgroup
(hgroup)[source]¶ Delete a host group.
Parameters: hgroup (str) – Name of the hgroup to be deleted. Returns: A dictionary mapping “name” to hgroup. Return type: ResponseDict
-
delete_host
(host)[source]¶ Delete a host.
Parameters: host (str) – Name of host to be deleted. Returns: A dictionary mapping “name” to host. Return type: ResponseDict
-
delete_kmip
(name)[source]¶ Delete an existing kmip configuration.
Parameters: name (string) – The name of the KMIP config to operate on. Returns: A dictionary containing the name of the deleted kmip configuration. Return type: ResponseDict Note
Requires use of REST API 1.12 or later.
-
delete_pod_replica_link
(local_pod_name, remote_pod_name)[source]¶ Delete replica-link.
Parameters: - local_pod_name (str) – local pod name.
- remote_pod_name (str) – remote pod name.
Returns: a dictionary describing the deleted replica-link, contains two pod names of the replica-link
Return type: ResponseDict
Note
Requires use of REST API 1.19 or later.
-
delete_snmp_manager
(manager)[source]¶ Delete an SNMP manager.
Parameters: manager (str) – Name of SNMP manager to be deleted. Returns: A dictionary mapping “name” to manager. Return type: ResponseDict
-
delete_subnet
(subnet)[source]¶ Delete a subnet.
Parameters: subnet (str) – Name of the subnet to be deleted. Returns: A dictionary mapping “name” to subnet. Return type: ResponseDict Note
Requires use of REST API 1.5 or later.
-
delete_vlan_interface
(interface)[source]¶ Delete a vlan interface.
Parameters: interface (str) – Name of the interface to be deleted. Returns: A dictionary mapping “name” to interface. Return type: ResponseDict Note
Requires use of REST API 1.5 or later.
-
demote_pod
(pod, **kwargs)[source]¶ Demote pod
Parameters: - pod (str) – Name of pod to be demoted.
- **kwargs – See the REST API Guide on your array for the documentation on the request: PUT pod
Returns: a dictionary describing a pod
Return type: ResponseDict
Note
Requires use of REST API 1.19 or later.
-
demote_volume
(volume)[source]¶ Demote a volume
Parameters: volume (str) – Name of volume to be demoted. Returns: A dictionary mapping “name” to name and “promotion_status” to the volume’s latest promotion status. Return type: ResponseDict Note
Requires use of REST API 1.18 or later.
-
destroy_pgroup
(pgroup, **kwargs)[source]¶ Destroy an existing pgroup or pgroup snapshot.
Parameters: - pgroup (str) – Name of pgroup(snap) to be destroyed.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pgroup/:pgroup
Returns: A dictionary mapping “name” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
destroy_pod
(pod)[source]¶ Destroy an existing pod.
Parameters: pod (str) – Name of the pod to be destroyed. Returns: A dictionary mapping “name” to pod, and the time remaining before the pod is eradicated. Return type: ResponseDict Note
Requires use of REST API 1.13 or later.
-
destroy_vgroup
(vgroup)[source]¶ Destroy an existing vgroup.
Parameters: vgroup (str) – Name of vgroup to be destroyed. Returns: A dictionary mapping “name” to vgroup. Return type: ResponseDict Note
Requires use of REST API 1.13 or later.
-
destroy_volume
(volume)[source]¶ Destroy an existing volume or snapshot.
Parameters: volume (str) – Name of the volume to be destroyed. Returns: A dictionary mapping “name” to volume. Return type: ResponseDict
-
disable_alert_recipient
(address)[source]¶ Disable alerts to an alert recipient.
Parameters: address (str) – Email address of alert recipient to be disabled. Returns: A dictionary mapping “name” to address and “enabled” to False. Return type: ResponseDict
-
disable_app
(name)[source]¶ Disable the specified app.
Parameters: name (str) – Name of app to be disabled. Returns: A dictionary describing the app. Return type: ResponseList
-
disable_app_vnc
(name)[source]¶ Disable vnc access for the specified app.
Parameters: name (str) – Name of app to disable vnc access. Returns: A dictionary describing the app. Return type: ResponseList
-
disable_console_lock
()[source]¶ Disable root lockout from the array at the physical console.
Returns: A dictionary mapping “console_lock” to “disabled”. Return type: ResponseDict
-
disable_directory_service
(check_peer=False)[source]¶ Disable the directory service.
Parameters: check_peer (bool, optional) – If True, disables server authenticity enforcement. If False, disables directory service integration. Returns: A dictionary describing the status of the directory service. Return type: ResponseDict
-
disable_network_interface
(interface)[source]¶ Disable a network interface.
Parameters: interface (str) – Name of network interface to be disabled. Returns: A dictionary describing the interface. Return type: ResponseDict
-
disable_pgroup_replication
(pgroup)[source]¶ Disable replication schedule for pgroup.
Parameters: pgroup (str) – Name of pgroup for which to disable replication schedule. Returns: A dictionary describing pgroup. Return type: ResponseDict Note
Requires use of REST API 1.2 or later.
-
disable_pgroup_snapshots
(pgroup)[source]¶ Disable snapshot schedule for pgroup.
Return type: ResponseDict Returns: A dictionary describing pgroup. Note
Requires use of REST API 1.2 or later.
-
disable_phonehome
()[source]¶ Disable hourly phonehome.
Returns: A dictionary mapping “phonehome” to “disabled”. Return type: ResponseDict
-
disable_remote_assist
()[source]¶ Disable remote assist.
Returns: A dictionary describing the status of the remote assist connection. Return type: ResponseDict
-
disable_subnet
(subnet)[source]¶ Disable a subnet.
Parameters: subnet (str) – Name of subnet to be disabled. Returns: A dictionary describing the subnet. Return type: ResponseDict Note
Requires use of REST API 1.5 or later.
-
disconnect_array
(address)[source]¶ Disconnect this array from another one.
Parameters: address (str) – IP address or DNS name of other array. Returns: A dictionary mapping “name” to address. Return type: ResponseDict Note
Requires use of REST API 1.2 or later.
-
disconnect_azure_offload
(name)[source]¶ Disconnect an Azure Blob offload target.
Parameters: name (str) – Name of Azure Blob offload target to be disconnected. Returns: A dictionary describing the target. Return type: ResponseDict
-
disconnect_hgroup
(hgroup, volume)[source]¶ Delete a shared connection between a host group and a volume.
Parameters: - hgroup (str) – Name of hgroup to be disconnected from volume.
- volume (str) – Name of volume to be disconnected from hgroup.
Returns: A dictionary mapping “name” to hgroup and “vol” to volume.
Return type: ResponseDict
-
disconnect_host
(host, volume)[source]¶ Delete a connection between a host and a volume.
Parameters: - host (str) – Name of host to be disconnected from volume.
- volume (str) – Name of volume to be disconnected from host.
Returns: A dictionary mapping “name” to host and “vol” to volume.
Return type: ResponseDict
-
disconnect_nfs_offload
(name)[source]¶ Disconnect an nfs offload target.
Parameters: name (str) – Name of nfs offload target to be disconnected. Returns: A dictionary describing the target. Return type: ResponseDict
-
disconnect_s3_offload
(name)[source]¶ Disconnect an S3 offload target.
Parameters: name (str) – Name of S3 offload target to be disconnected. Returns: A dictionary describing the target. Return type: ResponseDict
-
enable_alert_recipient
(address)[source]¶ Enable alerts to an alert recipient.
Parameters: address (str) – Email address of alert recipient to be enabled. Returns: A dictionary mapping “name” to address and “enabled” to True. Return type: ResponseDict
-
enable_app
(name)[source]¶ Enable the specified app.
Parameters: name (str) – Name of app to be enabled. Returns: A dictionary describing the app. Return type: ResponseList
-
enable_app_vnc
(name)[source]¶ Enable vnc access for the specified app.
Parameters: name (str) – Name of app to enable vnc access. Returns: A dictionary describing the app. Return type: ResponseList
-
enable_console_lock
()[source]¶ Enable root lockout from the array at the physical console.
Returns: A dictionary mapping “console_lock” to “enabled”. Return type: ResponseDict
-
enable_directory_service
(check_peer=False)[source]¶ Enable the directory service.
Parameters: check_peer (bool, optional) – If True, enables server authenticity enforcement. If False, enables directory service integration. Returns: A dictionary describing the status of the directory service. Return type: ResponseDict
-
enable_network_interface
(interface)[source]¶ Enable a network interface.
Parameters: interface (str) – Name of network interface to be enabled. Returns: A dictionary describing the interface. Return type: ResponseDict
-
enable_pgroup_replication
(pgroup)[source]¶ Enable replication schedule for pgroup.
Parameters: pgroup (str) – Name of pgroup for which to enable replication schedule. Returns: A dictionary describing pgroup. Return type: ResponseDict Note
Requires use of REST API 1.2 or later.
-
enable_pgroup_snapshots
(pgroup)[source]¶ Enable snapshot schedule for pgroup.
Parameters: pgroup (str) – Name of pgroup for which to enable snapshot schedule. Returns: A dictionary describing pgroup. Return type: ResponseDict Note
Requires use of REST API 1.2 or later.
-
enable_phonehome
()[source]¶ Enable hourly phonehome.
Returns: A dictionary mapping “phonehome” to “enabled”. Return type: ResponseDict
-
enable_remote_assist
()[source]¶ Enable remote assist.
Returns: A dictionary describing the status of the remote assist connection. Return type: ResponseDict
-
enable_subnet
(subnet)[source]¶ Enable a subnet.
Parameters: subnet (str) – Name of subnet to be enabled. Returns: A dictionary describing the subnet. Return type: ResponseDict Note
Requires use of REST API 1.5 or later.
-
eradicate_pgroup
(pgroup, **kwargs)[source]¶ Eradicate a destroyed pgroup.
Parameters: - pgroup (str) – Name of pgroup to be eradicated.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: DELETE pgroup/:pgroup
Returns: A dictionary mapping “name” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
eradicate_pod
(pod)[source]¶ Eradicate a destroyed pod.
Parameters: pod (str) – Name of the pod to be eradicated. Returns: A dictionary mapping “name” to pod. Return type: ResponseDict Note
This operation fails if pod is not destroyed.
Note
Requires use of REST API 1.13 or later.
-
eradicate_vgroup
(vgroup)[source]¶ Eradicate a destroyed vgroup.
Parameters: vgroup (str) – Name of vgroup to be eradicated. Returns: A dictionary mapping “name” to vgroup. Return type: ResponseDict Note
Requires use of REST API 1.13 or later.
-
eradicate_volume
(volume)[source]¶ Eradicate a destroyed volume or snapshot.
Parameters: volume (str) – Name of the volume to be eradicated. Returns: A dictionary mapping “name” to volume. Return type: ResponseDict Note
This operation fails if volume is not destroyed.
-
extend_volume
(volume, size)[source]¶ Extend a volume to a new, larger size.
Parameters: - volume (str) – Name of the volume to be extended.
- size (int or str) – Size in bytes, or string representing the size of the volume to be created.
Returns: A dictionary mapping “name” to volume and “size” to the volume’s new size in bytes.
Return type: ResponseDict
Note
The new size must be larger than the volume’s old size.
Note
The maximum volume size supported is 4 petabytes (4 * 2^50).
Note
If size is an int, it must be a multiple of 512.
Note
If size is a string, it must consist of an integer followed by a valid suffix.
Accepted Suffixes
Suffix Size Bytes S Sector (2^9) K Kilobyte (2^10) M Megabyte (2^20) G Gigabyte (2^30) T Terabyte (2^40) P Petabyte (2^50)
-
flag_message
(message_id)[source]¶ Flag an alert message or audit record.
Parameters: message_id (int or str) – ID of message to be flagged. Returns: A dictionary mapping “id” to message_id. Return type: ResponseDict
-
get
(**kwargs)[source]¶ Get array attributes.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET array Returns: A dictionary describing the array or a list of dictionaries describing multiple array attributes, depending on the arguments passed in. Return type: ResponseDict or ResponseList
-
get_admin
(admin)[source]¶ Returns a dictionary describing an admin.
Parameters: admin (str) – Name of admin to get. Returns: A dictionary mapping “name” to admin and “role” to their role. Return type: ResponseDict Note
Requires use of REST API 1.14 or later.
-
get_admin_lockout_info
(admin)[source]¶ Return a dictionary describing lockout information for a specific admin.
Parameters: admin (str) – Name of admin whose lockout info is requested Returns: A dictionary describing a specific locked admin Return type: ResponseDict Note
Requires use of REST API 1.16 or later.
-
get_alert_recipient
(address)[source]¶ Return a dictionary describing an alert recipient.
Parameters: address (str) – Email address of alert recipient to get information about. Returns: A dictionary mapping “name” to address and “enabled” to True if that alert recipient is enabled, False otherwise. Return type: ResponseDict
-
get_api_token
(admin, **kwargs)[source]¶ Return a dictionary describing an admin’s API token.
Parameters: - admin (str) – Name of admin whose API token to get.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET admin/:admin/apitoken
Returns: A dictionary describing admin’s API token.
Return type: ResponseDict
-
get_app
(name, **kwargs)[source]¶ Returns a list of dictionaries describing the app.
Parameters: - name (string) – The name of the app.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET app/:app
Returns: A list of dictionaries describing the app.
Return type: ResponseList
-
get_app_node
(app_name, **kwargs)[source]¶ Returns a list of dictionaries describing the nodes of an app.
Parameters: - app_name (string) – The name of the app.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET app/:app/nodes
Returns: A list of dictionaries describing the nodes of an app.
Return type: ResponseList
-
get_app_software
(name, **kwargs)[source]¶ List the specified app software.
Parameters: - name (string) – The name of the app.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET software/app/:app
Returns: A list of dictionaries describing the app.
Return type: ResponseList
-
get_azure_offload
(name, **kwargs)[source]¶ Return a dictionary describing the connected Azure Blob offload target.
Parameters: - offload (str) – Name of Azure Blob offload target to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET azure_offload/::offload
Returns: A dictionary describing the Azure Blob offload connection.
Return type: ResponseDict
-
get_certificate
(**kwargs)[source]¶ Get the attributes of the current array certificate.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET cert Returns: A dictionary describing the configured array certificate. Return type: ResponseDict Note
Requires use of REST API 1.3 or later.
-
get_certificate_signing_request
(**kwargs)[source]¶ Construct a certificate signing request (CSR) for signing by a certificate authority (CA).
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET cert/certificate_signing_request Returns: A dictionary mapping “certificate_signing_request” to the CSR. Return type: ResponseDict Note
Requires use of REST API 1.3 or later.
In version 1.12, purecert was expanded to allow manipulation of multiple certificates, by name. To preserve backwards compatibility, the default name, if none is specified, for this version is ‘management’ which acts on the certificate previously managed by this command.
-
get_console_lock_status
()[source]¶ Get console-lock status of the array.
Returns: A dictionary mapping “console_lock” to “enabled” if console_lock is enabled, else “disabled”. Return type: ResponseDict
-
get_directory_service
(**kwargs)[source]¶ Return a dictionary describing directory service configuration.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET directoryservice Returns: A dictionary describing the status of the directory service. Return type: ResponseDict
-
get_dns
()[source]¶ Get current DNS settings.
Returns: A dictionary describing current DNS settings. Return type: ResponseDict
-
get_drive
(drive)[source]¶ Get drive attributes.
Parameters: drive (str) – Name of drive to get information about. Returns: A dictionary describing drive. Return type: ResponseDict
-
get_eula
()[source]¶ Get EULA status of the array.
Returns: EULA agreement and a dictionary describing the EULA acceptance status on the array. Return type: ResponseDict
-
get_global_admin_attributes
()[source]¶ Return a dictionary describing the existing global admin attributes.
Returns: A dictionary describing the existing global admin attributes. Return type: ResponseDict Note
Requires use of REST API 1.16 or later.
-
get_hardware
(component, **kwargs)[source]¶ Returns a dictionary describing a hardware component.
Parameters: - component (str) – Name of hardware component to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET hardware/:component
Returns: A dictionary describing component.
Return type: ResponseDict
-
get_hgroup
(hgroup, **kwargs)[source]¶ Return a list of dictionaries describing a host group.
Parameters: - hgroup (str) – Name of hgroup to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET hgroup/:hgroup
Returns: A dictionary describing hgroup.
Return type: ResponseDict
-
get_host
(host, **kwargs)[source]¶ Return a dictionary describing a host.
Parameters: - host (str) – Name of host to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET host/:host
Returns: A dictionary describing host.
Return type: ResponseDict
-
get_kmip
(name, **kwargs)[source]¶ Show an existing kmip configuration.
Parameters: - name (string) – The name of the KMIP config to operate on.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET kmip/:kmip
Returns: A list of dictionaries containing the requested kmip configuration.
Return type: ResponseList
Note
Requires use of REST API 1.12 or later.
-
get_manual_phonehome_status
()[source]¶ Get manually-initiated phonehome status.
Returns: A dictionary describing the current status of a manually-initiated phonehome. Return type: ResponseDict
-
get_network_interface
(interface, **kwargs)[source]¶ Return a dictionary describing a network interface.
Parameters: - interface (str) – Name of network interface to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET network/:network_component
Returns: A dictionary describing the interface.
Return type: ResponseDict
-
get_nfs_offload
(name, **kwargs)[source]¶ Return a dictionary describing the connected nfs offload target.
Parameters: - offload (str) – Name of NFS offload target to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET nfs_offload/::offload
Returns: A dictionary describing the nfs offload connection.
Return type: ResponseDict
-
get_offload
(name, **kwargs)[source]¶ Return a dictionary describing the connected offload target.
Parameters: - offload (str) – Name of offload target to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET offload/::offload
Returns: A dictionary describing the offload connection.
Return type: ResponseDict
-
get_pgroup
(pgroup, **kwargs)[source]¶ Return dictionary describing a pgroup or snapshot.
Parameters: - pgroup (str) – Name of pgroup to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET pgroup
Returns: A list describing snapshots of the pgroup if the paramater snap is passed as True, else a dictionary describing the pgroup.
Return type: ResponseDict or ResponseList
Note
Requires use of REST API 1.2 or later.
-
get_phonehome
()[source]¶ Return a dictionary describing if hourly phonehome is enabled.
Returns: A dictionary mapping “phonehome” to “enabled” if hourly phonehome is enabled, mapping to “disabled” otherwise. Return type: ResponseDict
-
get_pod
(pod, **kwargs)[source]¶ Return a dictionary describing a pod.
Parameters: - pod (str) – Name of the pod to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET pod/:pod
Returns: A dictionary describing the pod.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
get_publickey
(admin)[source]¶ Returns a dictionary describing an admin’s public key.
Parameters: admin (str) – Name of admin whose public key to get. Returns: A dictionary mapping “name” to admin and “publickey” to “****”. Return type: ResponseDict
-
get_remote_assist_status
()[source]¶ Return a dictionary describing whether remote assist is enabled.
Returns: A dictionary describing the current status of the remote assist connection. Return type: ResponseDict
-
get_rest_version
()[source]¶ Get the REST API version being used by this object.
Returns: The REST API version. Return type: str
-
get_s3_offload
(name, **kwargs)[source]¶ Return a dictionary describing the connected S3 offload target.
Parameters: - offload (str) – Name of S3 offload target to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET s3_offload/::offload
Returns: A dictionary describing the S3 offload connection.
Return type: ResponseDict
-
get_smtp
()[source]¶ Get the attributes of the current smtp server configuration.
Parameters: **kwargs – See the REST API Guide on your array for the documentation on the request: GET smtp Returns: A dictionary describing the smtp server configuration. Return type: ResponseDict Note
Requires use of REST API 1.14 or later.
-
get_snmp_engine_id
()[source]¶ Return the SNMP v3 engine ID generated for the array.
Returns: A dictionary mapping “engine_id” to the array’s SNMP engine ID. Return type: ResponseDict Note
Requires use of SNMP v3.
-
get_snmp_manager
(manager)[source]¶ Return a dictionary describing an SNMP manager.
Parameters: manager (str) – Name of SNMP manager to get information about. Returns: A dictionary describing manager. Return type: ResponseDict
-
get_subnet
(subnet)[source]¶ Return a dictionary describing a subnet.
Parameters: subnet (str) – Name of the subnet to get information about. Returns: A dictionary describing the subnet. Return type: ResponseDict Note
Requires use of REST API 1.5 or later.
-
get_vgroup
(vgroup, **kwargs)[source]¶ Return dictionary describing a vgroup.
Parameters: - vgroup (str) – Name of vgroup to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET vgroup
Returns: A list describing a dictionary describing the vgroup.
Return type: ResponseDict or ResponseList
Note
Requires use of REST API 1.13 or later.
-
get_volume
(volume, **kwargs)[source]¶ Return a dictionary describing a volume or snapshot.
Parameters: - volume (str) – Name of the volume to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET volume/:volume
Returns: A list describing snapshots of the volume if the paramater snap is passed as True, else a dictionary describing the volume.
Return type: ResponseDict or ResponseList
-
install_app
(name, **kwargs)[source]¶ Install the specified app.
Parameters: name (string) – The name of the app. Returns: A dictionary describing the app. Return type: ResponseList
End the REST API session by invalidating the current session cookie.
Note
Calling any other methods again creates a new cookie. This method is intended to be called when the FlashArray object is no longer needed.
-
list_admins
(**kwargs)[source]¶ Return a list of dictionaries describing local admins.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET admin Returns: A list of dictionaries mapping “name” to a username and “role” to their role for each local admin on the array. Return type: ResponseList Note
Requires use of REST API 1.14 or later.
-
list_alert_recipients
()[source]¶ Return a list of dictionaries describing alert recipients.
Returns: A list of dictionaries mapping “name” to a recipient’s address and “enabled” to True if that recipient is enabled, False otherwise, for each alert recipient. Return type: ResponseList
-
list_api_tokens
(**kwargs)[source]¶ Return a list of dictionaries describing REST API tokens.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET admin Returns: A list of dictionaries describing the API token of each admin with an API token set. Return type: ResponseList Note
The API tokens are replaced with “****” unless the parameter expose is passed as True.
-
list_app_nodes
(**kwargs)[source]¶ Returns a list of dictionaries describing app nodes.
Parameters: **kwargs (optional) – See the REST API Guid on your array for the documentation on the request: GET app/nodes Returns: A list of dictionaries describing app nodes. Return type: ResponseList
-
list_app_software
(**kwargs)[source]¶ List app software.
Parameters: - **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET software/app
- app (str) – Name of app to get information about.
Returns: A dictionary describing app.
Return type: ResponseDict
-
list_apps
(**kwargs)[source]¶ Returns a list of dictionaries describing apps.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET app Returns: A list of dictionaries describing each app. Return type: ResponseList
-
list_array_connections
(**kwargs)[source]¶ Return list of connected arrays.
Returns: A list of dictionaries describing each connection to another array. Return type: ResponseList Note
Requires use of REST API 1.2 or later.
-
list_azure_offload
(**kwargs)[source]¶ Return a list of dictionaries describing connected Azure Blob offload targets.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET azure_offload Returns: A list of dictionaries describing Azure Blob offload connections. Return type: ResponseList
-
list_certificates
()[source]¶ Get the attributes of the current array certificate.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET cert Returns: A list of dictionaries describing all configured certificates. Return type: ResponseList Note
Requires use of REST API 1.12 or later.
-
list_directory_service_roles
(**kwargs)[source]¶ Get directory service groups for roles.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET directoryservice/role Returns: A list of dictionaries describing the group and group base for each role. Return type: ResponseList Note
Requires use of REST API 1.16 or later.
-
list_drives
()[source]¶ Returns a list of dictionaries describing SSD and NVRAM modules.
Returns: A list of dictionaries describing each drive. Return type: ResponseList
-
list_hardware
(**kwargs)[source]¶ Returns a list of dictionaries describing hardware.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET hardware Returns: A list of dictionaries describing each hardware component. Return type: ResponseList
-
list_hgroup_connections
(hgroup)[source]¶ Return a list of dictionaries describing shared connected volumes.
Parameters: hgroup (str) – Name of hgroup for which to list connections. Returns: A list of dictionaries describing hgroup’s connections. Return type: ResponseList
-
list_hgroups
(**kwargs)[source]¶ Return a list of dictionaries describing each host group.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET hgroup Returns: A list of dictionaries describing each hgroup. Return type: ResponseList
-
list_host_connections
(host, **kwargs)[source]¶ Return a list of dictionaries describing connected volumes.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET host/:host/volume Returns: A list of dictionaries describing host’s connections. Return type: ResponseList
-
list_hosts
(**kwargs)[source]¶ Return a list of dictionaries describing each host.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET host Returns: A list of dictionaries describing each host. Return type: ResponseList
-
list_kmip
()[source]¶ Show all existing kmip configurations.
Returns: A list of dictionaries containing the requested kmip configuration. Return type: ResponseList Note
Requires use of REST API 1.12 or later.
-
list_locked_admins_lockout_info
()[source]¶ Return a list of dictionaries describing lockout information for locked admins.
Returns: A list of dictionaries describing all the locked admins Return type: ResponseList Note
Requires use of REST API 1.16 or later.
-
list_maintenance_windows
(**kwargs)[source]¶ Return a list of dictionaries describing each maintenance window.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET maintenance_window Returns: A list of dictionaries describing each maintenance window. Return type: ResponseList
-
list_messages
(**kwargs)[source]¶ Return a list of alert messages.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET message Returns: A list of dictionaries describing each message. Return type: ResponseList
-
list_network_interfaces
(**kwargs)[source]¶ Get a list of dictionaries describing network interfaces.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET network Returns: A list of dictionaries describing each network interface. Return type: ResponseList
-
list_nfs_offload
(**kwargs)[source]¶ Return a list of dictionaries describing connected nfs offload targets.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET nfs_offload Returns: A list of dictionaries describing NFS offload connections. Return type: ResponseList
-
list_offload
(**kwargs)[source]¶ Return a list of dictionaries describing connected offload targets.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET offload Returns: A list of dictionaries describing offload connections. Return type: ResponseList
-
list_pgroups
(**kwargs)[source]¶ Return list dictionaries describing each pgroup.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET pgroup Returns: A list of dictionaries describing each pgroup. Return type: ResponseList Note
Requires use of REST API 1.2 or later.
-
list_pod_replica_links
(**kwargs)[source]¶ List replica-link.
Parameters: **kwargs – See the REST API Guide on your array for the documentation on the request: GET pod/replica-link Returns: a dictionary describing the replica-link Return type: ResponseDict Note
Requires use of REST API 1.19 or later.
-
list_pods
(**kwargs)[source]¶ Return a list of dictionaries describing each pod.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET pod Returns: A list of dictionaries describing each pod. Return type: ResponseList Note
Requires use of REST API 1.13 or later.
-
list_ports
(**kwargs)[source]¶ List SAN ports.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET port Returns: A list of dictionaries describing each port. Return type: ResponseList
-
list_publickeys
()[source]¶ Return a list of dictionaries describing public keys.
Returns: A list of dictionaries mapping “name” to a username and “publickey” to “****” for each admin with a public key set. Return type: ResponseList
-
list_s3_offload
(**kwargs)[source]¶ Return a list of dictionaries describing connected S3 offload targets.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET s3_offload Returns: A list of dictionaries describing S3 offload connections. Return type: ResponseList
-
list_snmp_managers
()[source]¶ Return a list of dictionaries describing SNMP managers.
Returns: A list of dictionaries describing each SNMP manager. Return type: ResponseList
-
list_subnets
(**kwargs)[source]¶ Get a list of dictionaries describing subnets.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET subnet Returns: A list of dictionaries describing each subnet. Return type: ResponseList Note
Requires use of REST API 1.5 or later.
-
list_vgroups
(**kwargs)[source]¶ Return list dictionaries describing each vgroup.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET vgroup Returns: A list of dictionaries describing each vgroup. Return type: ResponseList Note
Requires use of REST API 1.13 or later.
-
list_volume_block_differences
(volume, **kwargs)[source]¶ Return a list of block differences for the specified volume.
Parameters: - volume (str) – Name of the volume to get information about.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET volume/:volume/diff
Returns: A list of dictionaries describing block differences between the specified volume and the base volume.
Return type: ResponseList
Note
Requires use of REST API 1.3 or later.
-
list_volume_private_connections
(volume, **kwargs)[source]¶ Return a list of dictionaries describing connected hosts.
Parameters: volume (str) – Name of the volume for which to list the private connections. Returns: A list of dictionaries describing the volume’s private connections. Return type: ResponseList
Return a list of dictionaries describing connected host groups.
Parameters: volume (str) – Name of the volume for which to list the shared connections. Returns: A list of dictionaries describing the volume’s shared connections. Return type: ResponseList
-
list_volumes
(**kwargs)[source]¶ Return a list of dictionaries describing each volume.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET volume Returns: A list of dictionaries describing each volume. Return type: ResponseList
-
move_volume
(volume, container)[source]¶ Move a volume to a new pod or vgroup
Parameters: - volume (str) – Name of the volume to move.
- container (str) – Destination container of the move, either a pod, a vgroup or “” for the local array.
Returns: a dictionary describing the volume, with new container reflected in new name.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
static
page_through
(page_size, function, *args, **kwargs)[source]¶ Return an iterator over all pages of a REST operation.
Parameters: - page_size – Number of elements to retrieve per call.
- function – FlashArray function that accepts limit as an argument.
- *args – Positional arguments to be passed to function.
- **kwargs – Keyword arguments to be passed to function.
Returns: An iterator of tuples containing a page of results for the function(*args, **kwargs) and None, or None and a PureError if a call to retrieve a page fails.
Return type: iterator
Note
Requires use of REST API 1.7 or later.
Only works with functions that accept limit as an argument.
Iterator will retrieve page_size elements per call
Iterator will yield None and an error if a call fails. The next call will repeat the same call, unless the caller sends in an alternate page token.
-
pause_pod_replica_link
(local_pod_name, remote_pod_name, **kwargs)[source]¶ Create replica-link.
Parameters: - local_pod_name (str) – local pod name.
- remote_pod_name (str) – remote pod name.
- **kwargs – See the REST API Guide on your array for the documentation on the request: PUT pod/replica-link
Returns: a dictionary describing the replica-link
Return type: ResponseDict
Note
Requires use of REST API 1.19 or later.
-
phonehome
(action)[source]¶ Manually initiate or cancel a phonehome action.
Parameters: action (str) – The timeframe of logs to phonehome or cancel the current phonehome. Note
action must be one of: (“send_today”, “send_yesterday”, “send_all”, “cancel”).
Returns: A dictionary describing the current status of the phonehome request. Return type: ResponseDict
-
promote_pod
(pod, **kwargs)[source]¶ Promote pod
Parameters: - pod (str) – Name of pod to be promoted.
- **kwargs – See the REST API Guide on your array for the documentation on the request: PUT pod
Returns: a dictionary describing a pod
Return type: ResponseDict
Note
Requires use of REST API 1.19 or later.
-
promote_volume
(volume)[source]¶ Promote a volume
Parameters: volume (str) – Name of volume to be promoted. Returns: A dictionary mapping “name” to name and “promotion_status” to the volume’s latest promotion status. Return type: ResponseDict Note
Requires use of REST API 1.18 or later.
-
recover_pgroup
(pgroup, **kwargs)[source]¶ Recover a destroyed pgroup that has not yet been eradicated.
Parameters: - pgroup (str) – Name of pgroup to be recovered.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT pgroup/:pgroup
Returns: A dictionary mapping “name” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
recover_pod
(pod)[source]¶ Recover a pod that has been destroyed but not eradicated.
Parameters: pod (str) – Name of pod to be recovered. Returns: A dictionary mapping “name” to pod, and the time remaining which will now be null. Return type: ResponseDict Note
This must be done within the 24 hours following a pod’s destruction or it will be eradicated.
Note
Requires use of REST API 1.13 or later.
-
recover_vgroup
(vgroup)[source]¶ Recover a destroyed vgroup that has not yet been eradicated.
Parameters: vgroup (str) – Name of vgroup to be recovered. Returns: A dictionary mapping “name” to vgroup. Return type: ResponseDict Note
Requires use of REST API 1.13 or later.
-
recover_volume
(volume)[source]¶ Recover a volume that has been destroyed but not eradicated.
Parameters: volume (str) – Name of volume to be recovered. Returns: A dictionary mapping “name” to volume. Return type: ResponseDict Note
This must be done within the 24 hours following a volume’s destruction or it will be eradicated.
-
refresh_admin
(admin, **kwargs)[source]¶ Refresh the admin permission cache for the specified admin.
Parameters: - admin (str) – Name of admin whose permission cache is to be refreshed.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: GET admin
Returns: A dictionary mapping “name” to admin and “role” to the admin’s role.
Return type: ResponseDict
Note
Setting the optional parameter clear to True only clears the cache without doing an LDAP lookup to get new permissions.
-
refresh_admins
()[source]¶ Clear the admin permission cache.
Returns: A dictionary mapping “name” to “[ALL]” and “role” to None. Return type: ResponseDict Note
Does not immediately do any LDAP lookups to get new permissions.
-
remove_hgroup
(hgroup, pgroup)[source]¶ Remove an hgroup from a pgroup.
Parameters: - hgroup (str) – Name of the hgroup to remove from pgroup.
- pgroup (str) – pgroup from which to remove hgroup.
Returns: A dictionary mapping “name” to hgroup and “protection_group” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.7 or later.
-
remove_host
(host, pgroup)[source]¶ Remove a host from a pgroup.
Parameters: - host (str) – Name of the host to remove from pgroup.
- pgroup (str) – pgroup from which to remove host.
Returns: A dictionary mapping “name” to host and “protection_group” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.7 or later.
-
remove_pod
(pod, array, **kwargs)[source]¶ Remove arrays from a pod.
Parameters: - pod (str) – Name of the pod.
- array (str) – Array to remove from pod.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: DELETE pod/:pod/array/:array**
Returns: A dictionary mapping “name” to pod and “array” to the pod’s new array list.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
remove_tag_from_volume
(volume, key, **kwargs)[source]¶ Remove a tag from a volume and return a dictionary describing it.
Parameters: - volume (str) – Name of the volume.
- key – Name of the key to be deleted
- **kwargs – See the REST API Guide on your array for the documentation on the request: DELETE volume/:volume/tags
Returns: A dictionary describing the tags added to the volume.
Return type: ResponseDict
Note
Remove a key from the volume.
Note
Requires use of REST API 1.19 or later.
-
remove_volume
(volume, pgroup)[source]¶ Remove a volume from a pgroup.
Parameters: - volume (str) – Name of the volume to remove from pgroup.
- pgroup (str) – pgroup from which to remove volume.
Returns: A dictionary mapping “name” to volume and “protection_group” to pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.7 or later.
-
rename
(name)[source]¶ Rename the array.
Parameters: - name – The new name for the array.
- type – str
Returns: A dictionary mapping “array_name” to name.
Return type: ResponseDict
-
rename_hgroup
(hgroup, name)[source]¶ Rename a host group.
Parameters: - hgroup (str) – Name of hgroup to be renamed.
- name (str) – New name of hgroup to be renamed.
Returns: A dictionary mapping “name” to name.
Return type: ResponseDict
-
rename_host
(host, name)[source]¶ Rename a host.
Parameters: - host (str) – Name of host to be renamed.
- name (str) – New name of host to be renamed.
Returns: A dictionary mapping “name” to name.
Return type: ResponseDict
-
rename_pgroup
(pgroup, name)[source]¶ Rename a pgroup.
Parameters: - pgroup (str) – Current name of pgroup to be renamed.
- name (str) – New name of pgroup to be renamed.
Returns: A dictionary mapping “name” to name.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
rename_pod
(pod, name)[source]¶ Rename a pod.
Parameters: - pod (str) – Name of the pod to be renamed.
- name (str) – New name of pod to be renamed.
Returns: A dictionary mapping “name” to name.
Return type: ResponseDict
Note
All pod objects in the named pod also are renamed to the new name, followed by its previous suffix.
Note
Requires use of REST API 1.13 or later.
-
rename_snmp_manager
(manager, name)[source]¶ Rename an SNMP manager.
Parameters: - manager (str) – Current name of the SNMP manager to be renamed.
- name (str) – New name of the SNMP manager to be renamed.
Returns: A dictionary describing the renamed SNMP manager.
Return type: ResponseDict
-
rename_subnet
(subnet, name)[source]¶ Rename a subnet.
Parameters: - subnet (str) – Current name of the subnet to be renamed.
- name (str) – New name of the subnet to be renamed.
Returns: A dictionary describing the renamed subnet.
Return type: ResponseDict
Note
Requires use of REST API 1.5 or later.
-
rename_vgroup
(vgroup, name)[source]¶ Rename a vgroup.
Parameters: - vgroup (str) – Current name of vgroup to be renamed.
- name (str) – New name of vgroup to be renamed.
Returns: A dictionary mapping “name” to name.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
rename_volume
(volume, name)[source]¶ Rename a volume.
Parameters: - volume (str) – Name of the volume to be renamed.
- name (str) – New name of volume to be renamed.
Returns: A dictionary mapping “name” to name.
Return type: ResponseDict
Note
All snapshots of the named volume also are renamed to the new name, followed by its previous suffix.
-
resume_pod_replica_link
(local_pod_name, remote_pod_name, **kwargs)[source]¶ Resume replica-link.
Parameters: - local_pod_name (str) – local pod name.
- remote_pod_name (str) – remote pod name.
- **kwargs – See the REST API Guide on your array for the documentation on the request: PUT pod/replica-link
Returns: a dictionary describing the replica-link
Return type: ResponseDict
Note
Requires use of REST API 1.19 or later.
-
schedule_maintenance_window
(**kwargs)[source]¶ Schedule a maintenance window and return a dictionary describing it.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST maintenance_window Returns: A dictionary describing the scheduled maintenance window. Return type: ResponseDict
-
send_pgroup_snapshot
(source, **kwargs)[source]¶ Send an existing pgroup snapshot to target(s)
Parameters: - source (str) – Name of pgroup snapshot to send.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: POST pgroup
Returns: A list of dictionaries describing the sent snapshots.
Return type: ResponseList
Note
Requires use of REST API 1.16 or later.
-
set
(**kwargs)[source]¶ Set array attributes.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT array Returns: A dictionary mapping the parameter that was set to its new value. Return type: ResponseDict
-
set_admin
(admin, **kwargs)[source]¶ Set an attribute of an admin.
Parameters: - admin (str) – Name of admin for whom to set an attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT admin/:admin
Returns: A dictionary describing the admin.
Return type: ResponseDict
Note
Requires use of REST API 1.14 or later.
-
set_certificate
(**kwargs)[source]¶ Modify an existing certificate, creating a new self signed one or importing a certificate signed by a certificate authority (CA).
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT cert Returns: A dictionary describing the configured array certificate. Return type: ResponseDict Note
Requires use of REST API 1.3 or later.
In version 1.12, purecert was expanded to allow manipulation of multiple certificates, by name. To preserve backwards compatibility, the default name, if none is specified, for this version is ‘management’ which acts on the certificate previously managed by this command.
-
set_directory_service
(**kwargs)[source]¶ Set an attribute of the directory service configuration.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT directoryservice Returns: A dictionary describing the status of the directory service. Return type: ResponseDict
-
set_directory_service_roles
(**kwargs)[source]¶ Set directory service groups for roles.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT directoryservice/role Returns: A list of dictionaries describing the group and group base for each role changed. Return type: ResponseList Note
Requires use of REST API 1.16 or later.
-
set_dns
(**kwargs)[source]¶ Set DNS settings.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT dns Returns: A dictionary describing current DNS settings. Return type: ResponseDict
-
set_eula
(**kwargs)[source]¶ Accept EULA.
Parameters: **kwargs – See the REST API Guide on your array for the documentation on the request: PUT array/eula Returns: EULA agreement and a dictionary describing the EULA acceptance status on the array. Return type: ResponseDict
-
set_global_admin_attributes
(**kwargs)[source]¶ Set the global admin attributes.
Parameters: **kwargs – See the REST API Guide on your array for the documentation on the request: PUT admin/settings Returns: A dictionary describing the global admin attributes. Return type: ResponseDict Note
Requires use of REST API 1.16 or later.
-
set_hardware
(component, **kwargs)[source]¶ Set an attribute of a hardware component.
Parameters: - component (str) – Name of component for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT hardware/:component
Returns: A dictionary describing component.
Return type: ResponseDict
-
set_hgroup
(hgroup, **kwargs)[source]¶ Set an attribute of a host group.
Parameters: - hgroup (str) – Name of hgroup for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT hgroup/:hgroup
Returns: A dictionary describing hgroup.
Return type: ResponseDict
-
set_host
(host, **kwargs)[source]¶ Set an attribute of a host.
Parameters: - host (str) – Name of host for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT host/:host
Returns: A dictionary describing host.
Return type: ResponseDict
-
set_kmip
(name, **kwargs)[source]¶ Modify an existing kmip configuration.
Parameters: - name (string) – The name of the KMIP config to operate on.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT kmip
Returns: A list of dictionaries describing the modified kmip configuration.
Return type: ResponseList
Note
Requires use of REST API 1.12 or later.
-
set_network_interface
(interface, **kwargs)[source]¶ Set network interface attributes.
Parameters: - interface (str) – Name of network interface for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT network/:network_component
Returns: A dictionary describing the interface.
Return type: ResponseDict
-
set_password
(admin, new_password, old_password)[source]¶ Set an admin’s password.
Parameters: - admin (str) – Name of admin whose password is to be set.
- new_password (str) – New password for admin.
- old_password (str) – Current password of admin.
Returns: A dictionary mapping “name” to admin.
Return type: ResponseDict
-
set_pgroup
(pgroup, **kwargs)[source]¶ Set an attribute of a pgroup.
Parameters: - pgroup (str) – Name of pgroup for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT pgroup/:pgroup
Returns: A dictionary describing pgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.2 or later.
-
set_pod
(pod, **kwargs)[source]¶ Perform actions on a pod and return a dictionary describing it.
Parameters: - pod (str) – Name of the for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT pod/:pod
Returns: A dictionary describing the created pod.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
set_publickey
(admin, key)[source]¶ Set the public key associated with an admin.
Parameters: - admin (str) – Name of admin whose public key is to be set.
- key (str) – New public key for admin.
Returns: A dictionary mapping “name” to admin and “publickey” to “****”
Return type: ResponseDict
-
set_smtp
(**kwargs)[source]¶ Set the attributes of the current smtp server configuration.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT smtp Returns: A dictionary describing the smtp server configuration. Return type: ResponseDict Note
Requires use of REST API 1.14 or later.
-
set_snmp_manager
(manager, **kwargs)[source]¶ Set an attribute of an SNMP manager.
Parameters: - manager (str) – Name of the SNMP manager for which to set an attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT snmp/:manager
Returns: A dictionary describing manager.
Return type: ResponseDict
-
set_subnet
(subnet, **kwargs)[source]¶ Set subnet attributes.
Parameters: - subnet (str) – Name of subnet for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT subnet/:subnet
Returns: A dictionary describing the subnet.
Return type: ResponseDict
Note
Requires use of REST API 1.5 or later.
-
set_vgroup
(vgroup, **kwargs)[source]¶ Set an attribute of a vgroup.
Parameters: - vgroup (str) – Name of vgroup for which to set attribute.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT vgroup/:vgroup
Returns: A dictionary describing vgroup.
Return type: ResponseDict
Note
Requires use of REST API 1.13 or later.
-
set_volume
(volume, **kwargs)[source]¶ Perform actions on a volume and return a dictionary describing it.
Parameters: - volume (str) – Name of the volume to be modified.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT volume/:volume
Returns: A dictionary describing the created volume.
Return type: ResponseDict
-
test_alert
()[source]¶ Send test alerts to all recipients.
Returns: A list of dictionaries describing the test outcome for each recipient. Return type: ResponseList
-
test_alert_recipient
(address)[source]¶ Send a test alert to the specified recipient.
Parameters: address (str) – Address of recipient of test alert. Returns: A dictionary describing the test outcome. Return type: ResponseDict
-
test_directory_service
()[source]¶ Test the directory service.
Returns: A dictionary mapping “output” to the output of the directory service test. Return type: ResponseDict
-
test_kmip
(name)[source]¶ Test a given kmip configuration.
Parameters: name (string) – The name of the KMIP config to operate on. Returns: A list of dictionaries containing per-server kmip test results. Return type: ResponseList Note
Requires use of REST API 1.12 or later.
-
test_snmp_manager
(manager)[source]¶ Send a test trap to a manager.
Parameters: manager (str) – SNMP manager to which to send a test trap. Returns: A dictionary mapping “output” to the output of the test. Return type: ResponseDict
-
throttle_array_connection
(address, **kwargs)[source]¶ Set bandwidth limits on a connection.
Parameters: - address (str) – IP address or DNS name of other array.
- **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: PUT array/connection/:address
Returns: A dictionary describing the connection to the other array.
Return type: ResponseDict
Note
Requires use of REST API 1.5 or later.
-
truncate_volume
(volume, size)[source]¶ Truncate a volume to a new, smaller size.
Parameters: - volume (str) – Name of the volume to truncate.
- size (int or str) – Size in bytes, or string representing the size of the volume to be created.
Returns: A dictionary mapping “name” to volume and “size” to the volume’s new size in bytes.
Return type: ResponseDict
Note
A snapshot of the volume in its previous state is taken and immediately destroyed, but it is available for recovery for the 24 hours following the truncation.
-
uninstall_app
(name, **kwargs)[source]¶ Uninstall the specified app.
Parameters: name (string) – The name of the app. Returns: A dictionary describing the app. Return type: ResponseList
-
unlock_admin
(admin)[source]¶ Unlocks an admin
Parameters: admin (str) – Name of admin to unlock Returns: A dictionary describing the newly unlocked admin Return type: ResponseDict Note
Requires use of REST API 1.16 or later.
-
unschedule_maintenance_window
(**kwargs)[source]¶ Unschedule a maintenance window and return a dictionary describing it.
Parameters: **kwargs (optional) – See the REST API Guide on your array for the documentation on the request: DELETE maintenance_window Returns: A dictionary describing the unscheduled maintenance window. Return type: ResponseDict
-
class
purestorage.
PureError
(reason)[source]¶ Exception type raised by FlashArray object.
Parameters: reason (str) – A message describing why the error occurred. Variables: reason (str) – A message describing why the error occurred.
-
class
purestorage.
PureHTTPError
(target, rest_version, response)[source]¶ Exception raised as a result of non-200 response status code.
Parameters: - target (str) – IP or DNS name of the array that received the HTTP request.
- rest_version (str) – The REST API version that was used when making the request.
- response (
requests.Response
) – The response of the HTTP request that caused the error.
Variables: - target (str) – IP or DNS name of the array that received the HTTP request.
- rest_version (str) – The REST API version that was used when making the request.
- code (int) – The HTTP response status code of the request.
- headers (dict) – A dictionary containing the header information. Keys are case-insensitive.
- reason (str) – The textual reason for the HTTP status code (e.g. “BAD REQUEST”).
- text (str) – The body of the response which may contain a message explaining the error.
Note
The error message in text is not guaranteed to be consistent across REST versions, and thus should not be programmed against.