pypureclient.flasharray package

Subpackages

Submodules

pypureclient.flasharray.client module

pypureclient.flasharray.client.Client(target, version=None, id_token=None, private_key_file=None, private_key_password=None, username=None, client_id=None, key_id=None, issuer=None, api_token=None, retries=5, timeout=None, ssl_cert=None, user_agent=None, verify_ssl=None)

Initialize a FlashArray Client.

Keyword Arguments
  • target (str, required) – The target array’s IP or hostname.

  • version (str, optional) – REST API version to use. Defaults to the most recent version supported by both the client and the target array.

  • id_token (str, optional) – The security token that represents the identity of the party on behalf of whom the request is being made, issued by an enabled API client on the array. Overrides given private key.

  • private_key_file (str, optional) – The path of the private key to use. Defaults to None.

  • private_key_password (str, optional) – The password of the private key. Defaults to None.

  • username (str, optional) – Username of the user the token should be issued for. This must be a valid user in the system.

  • client_id (str, optional) – ID of API client that issued the identity token.

  • key_id (str, optional) – Key ID of API client that issued the identity token.

  • issuer (str, optional) – API client’s trusted identity issuer on the array.

  • api_token (str, optional) – API token for the user.

  • retries (int, optional) – The number of times to retry an API call if it fails for a non-blocking reason. Defaults to 5.

  • or (timeout int) – The timeout duration in seconds, either in total time or (connect and read) times. Defaults to None.

  • ssl_cert (str, optional) – SSL certificate to use. Defaults to None.

  • user_agent (str, optional) – User-Agent request header to use.

  • verify_ssl (bool | str, optional) – Controls SSL certificate validation. True specifies that the server validation uses default trust anchors; False switches certificate validation off, not safe!; It also accepts string value for a path to directory with certificates.

Raises

PureError – If it could not create an ID or access token

pypureclient.flasharray.client.choose_version(array_versions)
pypureclient.flasharray.client.get_array_versions(target, verify_ssl=None)
pypureclient.flasharray.client.validate_version(array_versions, version)
pypureclient.flasharray.client.version_to_module(version)

Module contents