Skip to content

Latest commit

 

History

History
472 lines (364 loc) · 26.4 KB

File metadata and controls

472 lines (364 loc) · 26.4 KB

fusion.SnapshotsApi

All URIs are relative to https://api.pure1.purestorage.com/fusion/api/1.2

Method HTTP request Description
create_snapshot POST /tenants/{tenant_name}/tenant-spaces/{tenant_space_name}/snapshots Creates Volume snapshots of specified Volume names.
delete_snapshot DELETE /tenants/{tenant_name}/tenant-spaces/{tenant_space_name}/snapshots/{snapshot_name} Eradicate a snapshot and its volume snapshots which were previously marked for deletion using PATCH.
get_snapshot GET /tenants/{tenant_name}/tenant-spaces/{tenant_space_name}/snapshots/{snapshot_name} Gets a specific Snapshot.
get_snapshot_by_id GET /resources/snapshots/{snapshot_id} Gets a specific Snapshot.
list_snapshots GET /tenants/{tenant_name}/tenant-spaces/{tenant_space_name}/snapshots Gets a list of Snapshots.
query_snapshots GET /resources/snapshots Get all Snapshots in the org. Provide a filter to search for specific snapshots.
update_snapshot PATCH /tenants/{tenant_name}/tenant-spaces/{tenant_space_name}/snapshots/{snapshot_name} Recovers a pending snapshot

create_snapshot

Operation create_snapshot(body, tenant_name, tenant_space_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)

Creates Volume snapshots of specified Volume names.

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
body = fusion.SnapshotPost() # SnapshotPost | 
tenant_name = 'tenant_name_example' # str | The Tenant name
tenant_space_name = 'tenant_space_name_example' # str | The Tenant Space name
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)

try:
    # Creates Volume snapshots of specified Volume names.
    api_response = api_instance.create_snapshot(body, tenant_name, tenant_space_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->create_snapshot: %s\n" % e)

Parameters

Name Type Description Notes
body SnapshotPost
tenant_name str The Tenant name
tenant_space_name str The Tenant Space name
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]

Return type

Operation

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_snapshot

Operation delete_snapshot(tenant_name, tenant_space_name, snapshot_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)

Eradicate a snapshot and its volume snapshots which were previously marked for deletion using PATCH.

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
tenant_name = 'tenant_name_example' # str | The Tenant name
tenant_space_name = 'tenant_space_name_example' # str | The Tenant Space name
snapshot_name = 'snapshot_name_example' # str | The Snapshot name
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)

try:
    # Eradicate a snapshot and its volume snapshots which were previously marked for deletion using PATCH.
    api_response = api_instance.delete_snapshot(tenant_name, tenant_space_name, snapshot_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->delete_snapshot: %s\n" % e)

Parameters

Name Type Description Notes
tenant_name str The Tenant name
tenant_space_name str The Tenant Space name
snapshot_name str The Snapshot name
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]

Return type

Operation

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_snapshot

Snapshot get_snapshot(tenant_name, tenant_space_name, snapshot_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)

Gets a specific Snapshot.

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
tenant_name = 'tenant_name_example' # str | The Tenant name
tenant_space_name = 'tenant_space_name_example' # str | The Tenant Space name
snapshot_name = 'snapshot_name_example' # str | The Snapshot name
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)

try:
    # Gets a specific Snapshot.
    api_response = api_instance.get_snapshot(tenant_name, tenant_space_name, snapshot_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->get_snapshot: %s\n" % e)

Parameters

Name Type Description Notes
tenant_name str The Tenant name
tenant_space_name str The Tenant Space name
snapshot_name str The Snapshot name
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]

Return type

Snapshot

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_snapshot_by_id

Snapshot get_snapshot_by_id(snapshot_id, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)

Gets a specific Snapshot.

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
snapshot_id = 'snapshot_id_example' # str | The Snapshot ID
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)

try:
    # Gets a specific Snapshot.
    api_response = api_instance.get_snapshot_by_id(snapshot_id, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->get_snapshot_by_id: %s\n" % e)

Parameters

Name Type Description Notes
snapshot_id str The Snapshot ID
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]

Return type

Snapshot

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_snapshots

SnapshotList list_snapshots(tenant_name, tenant_space_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id, filter=filter, sort=sort, limit=limit, offset=offset, id=id, name=name, display_name=display_name, protection_policy_id=protection_policy_id, destroyed=destroyed, time_remaining=time_remaining, volume=volume, placement_group=placement_group)

Gets a list of Snapshots.

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
tenant_name = 'tenant_name_example' # str | The Tenant name
tenant_space_name = 'tenant_space_name_example' # str | The Tenant Space name
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)
filter = 'filter_example' # str | filter should use expression language for filtering (optional)
sort = 'sort_example' # str | Returns the response items in the order specified. Set sort to the field(s) in the response by which to sort. Sorting can be performed on any of the fields in the response, and the items can be sorted in ascending or descending order by these fields. By default, the response items are sorted in ascending order. To sort in descending order, append the minus sign (-) to the field. A single request can be sorted on multiple fields. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple fields, list the fields as comma-separated values. (E.g. \"sort=size-,name\") (optional)
limit = 56 # int |  (optional)
offset = 56 # int |  (optional)
id = 'id_example' # str |  (optional)
name = 'name_example' # str |  (optional)
display_name = 'display_name_example' # str |  (optional)
protection_policy_id = 'protection_policy_id_example' # str |  (optional)
destroyed = true # bool |  (optional)
time_remaining = 789 # int |  (optional)
volume = 'volume_example' # str | Returns only snapshots which contain the given volume (optional)
placement_group = 'placement_group_example' # str | Returns only snapshots in the specified placement group. Cannot be specified together with volume (optional)

try:
    # Gets a list of Snapshots.
    api_response = api_instance.list_snapshots(tenant_name, tenant_space_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id, filter=filter, sort=sort, limit=limit, offset=offset, id=id, name=name, display_name=display_name, protection_policy_id=protection_policy_id, destroyed=destroyed, time_remaining=time_remaining, volume=volume, placement_group=placement_group)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->list_snapshots: %s\n" % e)

Parameters

Name Type Description Notes
tenant_name str The Tenant name
tenant_space_name str The Tenant Space name
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]
filter str filter should use expression language for filtering [optional]
sort str Returns the response items in the order specified. Set sort to the field(s) in the response by which to sort. Sorting can be performed on any of the fields in the response, and the items can be sorted in ascending or descending order by these fields. By default, the response items are sorted in ascending order. To sort in descending order, append the minus sign (-) to the field. A single request can be sorted on multiple fields. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple fields, list the fields as comma-separated values. (E.g. "sort=size-,name") [optional]
limit int [optional]
offset int [optional]
id str [optional]
name str [optional]
display_name str [optional]
protection_policy_id str [optional]
destroyed bool [optional]
time_remaining int [optional]
volume str Returns only snapshots which contain the given volume [optional]
placement_group str Returns only snapshots in the specified placement group. Cannot be specified together with volume [optional]

Return type

SnapshotList

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

query_snapshots

SnapshotList query_snapshots(filter=filter, sort=sort, limit=limit, offset=offset, id=id, name=name, display_name=display_name, tenant_space_id=tenant_space_id, tenant_id=tenant_id, protection_policy_id=protection_policy_id, destroyed=destroyed, time_remaining=time_remaining, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)

Get all Snapshots in the org. Provide a filter to search for specific snapshots.

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
filter = 'filter_example' # str | filter should use expression language for filtering (optional)
sort = 'sort_example' # str | Returns the response items in the order specified. Set sort to the field(s) in the response by which to sort. Sorting can be performed on any of the fields in the response, and the items can be sorted in ascending or descending order by these fields. By default, the response items are sorted in ascending order. To sort in descending order, append the minus sign (-) to the field. A single request can be sorted on multiple fields. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple fields, list the fields as comma-separated values. (E.g. \"sort=size-,name\") (optional)
limit = 56 # int |  (optional)
offset = 56 # int |  (optional)
id = 'id_example' # str |  (optional)
name = 'name_example' # str |  (optional)
display_name = 'display_name_example' # str |  (optional)
tenant_space_id = 'tenant_space_id_example' # str |  (optional)
tenant_id = 'tenant_id_example' # str |  (optional)
protection_policy_id = 'protection_policy_id_example' # str |  (optional)
destroyed = true # bool |  (optional)
time_remaining = 789 # int |  (optional)
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)

try:
    # Get all Snapshots in the org. Provide a filter to search for specific snapshots.
    api_response = api_instance.query_snapshots(filter=filter, sort=sort, limit=limit, offset=offset, id=id, name=name, display_name=display_name, tenant_space_id=tenant_space_id, tenant_id=tenant_id, protection_policy_id=protection_policy_id, destroyed=destroyed, time_remaining=time_remaining, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->query_snapshots: %s\n" % e)

Parameters

Name Type Description Notes
filter str filter should use expression language for filtering [optional]
sort str Returns the response items in the order specified. Set sort to the field(s) in the response by which to sort. Sorting can be performed on any of the fields in the response, and the items can be sorted in ascending or descending order by these fields. By default, the response items are sorted in ascending order. To sort in descending order, append the minus sign (-) to the field. A single request can be sorted on multiple fields. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple fields, list the fields as comma-separated values. (E.g. "sort=size-,name") [optional]
limit int [optional]
offset int [optional]
id str [optional]
name str [optional]
display_name str [optional]
tenant_space_id str [optional]
tenant_id str [optional]
protection_policy_id str [optional]
destroyed bool [optional]
time_remaining int [optional]
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]

Return type

SnapshotList

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_snapshot

Operation update_snapshot(body, tenant_name, tenant_space_name, snapshot_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)

Recovers a pending snapshot

Example

from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fusion.SnapshotsApi(fusion.ApiClient(configuration))
body = fusion.SnapshotPatch() # SnapshotPatch | 
tenant_name = 'tenant_name_example' # str | The Tenant name
tenant_space_name = 'tenant_space_name_example' # str | The Tenant Space name
snapshot_name = 'snapshot_name_example' # str | The Snapshot name
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)

try:
    # Recovers a pending snapshot
    api_response = api_instance.update_snapshot(body, tenant_name, tenant_space_name, snapshot_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SnapshotsApi->update_snapshot: %s\n" % e)

Parameters

Name Type Description Notes
body SnapshotPatch
tenant_name str The Tenant name
tenant_space_name str The Tenant Space name
snapshot_name str The Snapshot name
x_request_id str The Request ID supplied with the request, used to perform operations idempotently. [optional]
authorization str Access token (in JWT format) required to use any API endpoint. [optional]
x_correlation_id str The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. [optional]

Return type

Operation

Authorization

accessToken, oauth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]